:root {
    --cor-primaria: #3254A9; --cor-primaria-hover: #284387;
    --cor-secundaria: #6c757d; --cor-secundaria-hover: #5a6268;
    --cor-sucesso: #28a745; --cor-sucesso-hover: #218838;
    --cor-perigo: #dc3545; --cor-fundo-claro: #f8f9fa;
    --cor-feedback-sucesso: #a5d6a7;
    --cor-feedback-erro: #ef9a9a;
    --cor-feedback-neutro: #bbdefb;
}
html { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; margin: 0; background-color: #f4f5f7; color: #172b4d; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.login-page-background { background: linear-gradient(to bottom, #1C2F6D, #048DEB, #00d4ff); display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; overflow-y: auto; }
.login-logo { margin-bottom: 30px; }
.login-logo img { height: 60px; }
.login-container { max-width: 400px; width: 90%; padding: 40px; background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); box-sizing: border-box; }
.login-container h1 { text-align: left; margin-top: 0; margin-bottom: 25px; font-size: 24px; color: #333; }
.login-container input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; box-sizing: border-box; }
.login-container button { width: 100%; padding: 12px; border-radius: 4px; border: none; color: #fff; cursor: pointer; font-size: 16px; font-weight: bold; transition: background-color 0.2s; }
#login-btn { background-color: var(--cor-primaria); }
#login-btn:hover { background-color: var(--cor-primaria-hover); }
#signup-btn { background-color: var(--cor-sucesso); margin-top: 10px; }
#signup-btn:hover { background-color: var(--cor-sucesso-hover); }
#auth-feedback-login, #auth-feedback-signup { margin-top: 15px; text-align: center; color: var(--cor-perigo); font-weight: 500; min-height: 1em; }
.auth-switch-link { text-align: center; font-size: 14px; margin-top: 20px; }
.auth-switch-link a { color: var(--cor-primaria); font-weight: 500; text-decoration: none; }
.auth-switch-link a:hover { text-decoration: underline; }
.forgot-password { display: block; text-align: center; margin-top: 15px; font-size: 12px; }
.main-header, .funnel-nav, .controls-section { flex-shrink: 0; }
.main-header { background: linear-gradient(to right, #007bff, #00d4ff); color: white; padding: 10px 30px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; }
.logo-container { display: flex; align-items: center; gap: 15px; }
.header-logo { height: 35px; width: auto; }
.logo-container h1 { color: white; margin-left: 15px; font-size: 24px; }
.funnel-nav { background-color: #ffffff; padding: 10px 30px; border-bottom: 1px solid #dfe1e6; display: flex; gap: 10px; }
.funnel-btn { padding: 8px 16px; font-size: 14px; font-weight: 500; border: none; border-radius: 5px; background-color: transparent; color: #42526e; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.funnel-btn:hover { background-color: #f4f5f7; }
.funnel-btn.active { background-color: var(--cor-primaria); color: white; }
.controls-section { padding: 15px 30px; background-color: #ffffff; border-bottom: 1px solid #dfe1e6; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.search-container { flex-grow: 1; display: flex; align-items: center; gap: 10px; }
.search-container input { padding: 8px; border-radius: 3px; border: 1px solid #ccc; min-width: 300px; font-size: 14px; }
.actions-container { display: flex; gap: 10px; }
.btn-primary, .btn-success, .btn-secondary { padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; color: white; transition: background-color 0.2s; }
.btn-primary { background-color: var(--cor-primaria); }
.btn-primary:hover { background-color: var(--cor-primaria-hover); }
.btn-success { background-color: var(--cor-sucesso); }
.btn-success:hover { background-color: var(--cor-sucesso-hover); }
.btn-secondary { background-color: var(--cor-secundaria); }
.btn-secondary:hover { background-color: var(--cor-secundaria-hover); }
/* Wrapper com botões de navegação */
.kanban-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 100%;
    width: 100%;
}

.kanban-board {
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-grow: 1;
    min-height: 0;
    flex-wrap: nowrap;
    width: 100%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Oculta barra de rolagem nativa */
.kanban-board::-webkit-scrollbar {
    display: none;
}

/* Botões de scroll */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    color: #495057;
}

.scroll-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--cor-primaria);
    transform: translateY(-50%) scale(1.05);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-left {
    left: 10px;
}

.scroll-right {
    right: 10px;
}

/* Esconde botões quando não necessário */
.scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}
.kanban-column {
    background-color: #ebecf0;
    border-radius: 8px;
    width: 350px;
    min-width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}
.column-title { padding: 15px; font-size: 16px; font-weight: 600; margin: 0; flex-shrink: 0; }
.cards-container { padding: 0 8px 15px 15px; flex-grow: 1; overflow-y: auto; min-height: 0; }
.kanban-card { position: relative; background-color: #ffffff; border-radius: 5px; padding: 15px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(9,30,66,.25); cursor: grab; padding-bottom: 30px; display: flex; flex-direction: column; min-height: 100px; }
.card-title { font-weight: 600; margin-top: 0; margin-bottom: 5px; }
.card-info { font-size: 12px; color: #5e6c84; margin-bottom: 5px; }
.card-origin-icon { position: absolute; bottom: 8px; right: 8px; width: 16px; height: 16px; background-size: contain; background-repeat: no-repeat; }
.user-info { display: flex; align-items: center; gap: 15px; }
#user-email { font-size: 14px; font-weight: 500; }
#logout-btn { background-color: var(--cor-perigo); color: white; padding: 8px 12px; font-size: 12px; border: none; border-radius: 5px; cursor: pointer; }
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center !important;
    align-items: center !important;
    z-index: 1000;
}
.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    position: relative !important;
    margin: auto !important;
}
.modal-header { padding: 15px 20px; border-bottom: 1px solid #dee2e6; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { margin: 0; font-size: 20px; }
.close-button { background: transparent; border: none; font-size: 28px; cursor: pointer; color: #6c757d; }
.modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.form-group { margin-bottom: 0; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; box-sizing: border-box; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #dee2e6; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-danger { background-color: var(--cor-perigo); }
.footer-status-selector { display: flex; align-items: center; gap: 8px; }
.footer-status-selector label { font-weight: 600; font-size: 14px; }
.footer-status-selector select { padding: 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; max-width: 200px; }
.sub-heading { font-size: 14px; font-weight: 600; color: var(--cor-primaria); margin-top: 15px; margin-bottom: 0px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.btn-icon { background: transparent; padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; border: 1px solid transparent; }
.btn-icon svg { width: 18px; height: 18px; fill: var(--cor-perigo); }
optgroup { font-weight: bold; font-style: italic; }
.form-section-details { border: 1px solid #e9ecef; border-radius: 6px; }
.form-section-details summary { cursor: pointer; padding: 15px; background-color: #f8f9fa; list-style: none; }
.form-section-details summary::-webkit-details-marker { display: none; }
.form-section-details summary h4 { margin: 0; display: inline-block; }
.form-section-details summary::before { content: '▶'; display: inline-block; margin-right: 10px; transition: transform 0.2s; font-size: 12px; }
.form-section-details[open] > summary::before { transform: rotate(90deg); }
.details-content { padding: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.details-content .form-group { grid-column: span 2; }
.details-content .form-group:not(:has(textarea)) { grid-column: span 1; }
.footer-left-section { display: flex; align-items: flex-end; gap: 20px; flex-grow: 1; }
.footer-negotiation-details { display: flex; gap: 10px; align-items: flex-end; }
.footer-negotiation-details .form-group { margin-bottom: 0; }
.footer-negotiation-details input { padding: 10px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; max-width: 150px; }

/* === ESTILOS PARA O CHAT COM IA === */
#ai-chat-container { position: fixed; bottom: 20px; right: 20px; z-index: 1001; }
#ai-chat-open-btn {
    background: transparent; /* Remove o fundo */
    border: none; /* Remove a borda */
    box-shadow: none; /* Remove a sombra */
    padding: 0; /* Remove qualquer espaçamento interno */
    border-radius: 0; /* Remove o arredondamento */
    animation: none; /* Remove a animação do botão */

    /* Mantém a funcionalidade de posicionamento */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Agora, aplicamos todo o estilo e animação na IMAGEM.
*/
.ai-button-icon {
    width: 60px; /* Defina o tamanho que desejar para a sua imagem */
    height: 60px;
    object-fit: contain;
    transition: transform 0.3s ease; /* Adiciona uma transição suave para o hover */
    
    /* Aplica a animação de pulso diretamente na imagem */
    animation: pulse-image 2s infinite;
}

/* Efeito de zoom ao passar o mouse sobre a área do botão.
*/
#ai-chat-open-btn:hover .ai-button-icon {
    transform: scale(1.1); /* Aumenta a imagem ao passar o mouse */
}

/* Uma nova animação de pulso que funciona melhor com imagens (usando drop-shadow).
  Adicione isso no final do seu arquivo style.css
*/
@keyframes pulse-image {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 6px 15px rgba(50, 84, 169, 0.4));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
    }
}

#ai-chat-open-btn svg { flex-shrink: 0; }
#ai-chat-open-btn span { white-space: nowrap; margin-left: 10px; opacity: 0; transition: opacity 0.2s ease 0.1s; }
#ai-chat-open-btn:hover span { opacity: 1; }
#ai-chat-window { width: 350px; height: 500px; background-color: white; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.25); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
.chat-header { background: linear-gradient(to right, #1C2F6D, #048DEB, #00d4ff); color: white; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.chat-header h3 { margin: 0; font-size: 16px; }
#ai-chat-close-btn { background: none; border: none; color: white; font-size: 24px; cursor: pointer; opacity: 0.8; }
.chat-body { flex-grow: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.chat-message { max-width: 80%; padding: 10px 15px; border-radius: 20px; font-size: 14px; line-height: 1.4; }
.chat-message.bot { background-color: #f1f0f0; align-self: flex-start; border-bottom-left-radius: 5px; }
.chat-message.user { background-color: var(--cor-primaria); color: white; align-self: flex-end; border-bottom-right-radius: 5px; }
.chat-footer { display: flex; padding: 10px; border-top: 1px solid #eee; }
#ai-chat-input { flex-grow: 1; border: 1px solid #ddd; border-radius: 20px; padding: 10px 15px; font-size: 14px; outline: none; }
#ai-chat-send-btn { background: none; border: none; cursor: pointer; padding: 10px; color: var(--cor-primaria); }
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(50, 84, 169, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
}

/* === ESTILOS PARA O NOVO PAINEL DE RESUMO DO MODAL === */

.summary-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Cria 3 colunas */
    gap: 15px 20px; /* Espaçamento entre os itens */
    padding: 15px;
    background-color: var(--cor-fundo-claro);
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cor-secundaria);
    margin-bottom: 4px;
}

.summary-item input {
    font-size: 14px;
    font-weight: 500;
    padding: 8px;
    border: none;
    background-color: transparent;
    border-bottom: 1px solid #ccc;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.summary-item.full-width {
    grid-column: 1 / -1; /* Faz o item ocupar a largura total */
}

/* Ajuste para o grid de detalhes */
.details-content .full-width-detail {
    grid-column: 1 / -1;
}

.modal-body .sub-heading {
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    font-size: 16px;
}
/* --- ESTILOS PARA BOTÕES COM ÍCONE --- */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px; /* Ajuste o padding para o tamanho do ícone */
    width: auto; /* Permite que o botão se ajuste ao conteúdo (ícone) */
    min-width: 40px; /* Garante um tamanho mínimo para clique */
    height: 40px;
}

.btn-icon svg {
    width: 20px; /* Tamanho do ícone */
    height: 20px;
    margin: 0; /* Remove margens extras do ícone */
    stroke-width: 2; /* Espessura da linha do ícone */
}

/* Ajuste de cor para o ícone no botão de perigo */
.btn-danger.btn-icon svg {
    color: var(--cor-branca); /* Cor do ícone será branca */
}
/* --- ESTILO PARA O CAMPO DE LINK NO RESUMO DO MODAL --- */
.summary-link-container {
    font-size: 14px;
    font-weight: 500;
    padding: 8px;
    border: none;
    background-color: transparent;
    border-bottom: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
    min-height: 37px; /* Garante a mesma altura dos inputs */
    display: flex;
    align-items: center;
}

.summary-link-container a {
    color: var(--cor-primaria);
    text-decoration: none;
    font-weight: 600;
}

.summary-link-container a:hover {
    text-decoration: underline;
}

/* --- ESTILO PARA O INPUT EDITÁVEL DENTRO DO CAMPO DE LINK --- */
.summary-link-container input {
    font-size: 14px;
    font-weight: 500;
    padding: 0; /* Remove padding extra para se alinhar */
    border: none;
    background-color: transparent;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    color: #172b4d; /* Cor do texto do input */
    height: 100%;
}
/* --- ESTILOS PARA O ÍCONE DE ORIGEM NO MODAL --- */

/* Garante que o posicionamento absoluto do ícone funcione corretamente */
.modal-content {
    position: relative;
}

.modal-origin-icon {
    position: absolute;
    bottom: 20px;
    right: 25px;
    width: 24px; /* Um pouco maior para melhor visibilidade */
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 5; /* Garante que fique acima da maioria dos elementos */
    opacity: 0.6; /* Deixa um pouco sutil para não distrair */
    transition: opacity 0.2s ease-in-out;
}

.modal-origin-icon:hover {
    opacity: 1; /* Fica totalmente visível ao passar o mouse */
}
/* --- ESTILO PARA O VALOR DO LEAD NO CARD DO KANBAN --- */
.card-info.card-value {
    color: var(--cor-sucesso);
    font-weight: 600;
}

/* Opcional: Ajuste fino na margem entre as informações do card */
.kanban-card .card-info {
    margin-top: 4px;
    margin-bottom: 4px;
}
/* --- ESTILOS PARA GRUPO DE CAMPOS EM LINHA NO MODAL --- */

.inline-group {
    display: flex;
    flex-direction: row;
    gap: 20px; /* Espaçamento entre os dois campos */
    padding-top: 0;
    padding-bottom: 0;
    align-items: flex-end; /* Alinha os campos pela base */
}

/* Faz com que os campos filhos dentro do grupo cresçam para preencher o espaço */
.inline-group > .summary-item {
    flex-grow: 1;
    width: 50%; /* Garante que comecem com metade do espaço */
}

/* Ajuste específico para o campo do Instagram ocupar menos espaço */
.inline-group > .summary-item:has(#modal-instagram-handle) {
    flex-grow: 0.7; /* Faz o campo do Instagram ser um pouco menor */
}
/* --- ESTILOS PARA AVALIAÇÃO NO CABEÇALHO DO MODAL --- */

.modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lead-rating-info {
    display: flex;
    align-items: center;
    gap: 5px; /* Espaço entre os itens */
    color: #5e6c84; /* Cor cinza sutil */
    font-size: 14px;
    font-weight: 500;
}

.lead-rating-info svg {
    width: 16px;
    height: 16px;
    fill: #ffab00; /* Cor amarela para a estrela */
    stroke: #ffab00;
    stroke-width: 1;
}

.lead-rating-info .review-count {
    color: #6c757d; /* Cor um pouco mais clara para o número de avaliações */
}
/* --- ESTILOS PARA NOTIFICAÇÕES (TOAST) --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.toast {
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(100%);
    animation: slideInAndOut 5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.toast.success {
    background-color: var(--cor-sucesso);
}

.toast.error {
    background-color: var(--cor-perigo);
}

.toast.info {
    background-color: var(--cor-secundaria);
}

@keyframes slideInAndOut {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    10% { /* Animação de entrada */
        opacity: 1;
        transform: translateX(0);
    }
    90% { /* Fica visível */
        opacity: 1;
        transform: translateX(0);
    }
    100% { /* Animação de saída */
        opacity: 0;
        transform: translateX(100%);
    }
}
/* --- AJUSTES NO BOTÃO E BALÃO DO CHAT --- */

/* Aumenta o tamanho do ícone do botão */
.ai-button-icon {
    width: 70px; 
    height: 70px;
}

/* Estilo do balão de mensagem */
.chat-bubble {
    position: absolute;
    bottom: 90px; /* Posiciona acima do botão */
    right: 10px;
    background-color: white;
    color: #333;
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    font-weight: 500;
    opacity: 0; /* Começa invisível */
    animation: fadeInBubble 0.5s 1s forwards, bobBubble 3s infinite 1.5s; /* Animações */
}

/* Ponta do balão */
.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 25px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

@keyframes fadeInBubble {
    to { opacity: 1; }
}

@keyframes bobBubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}


/* --- AJUSTES NO VISUAL DO CHAT (AVATAR E BALÃO) --- */

.chat-message.bot {
    display: flex;
    align-items: flex-start; /* Alinha o avatar com o topo do balão */
    gap: 10px;
    background-color: transparent; /* Remove o fundo do contêiner principal */
}

/* Estilo do balão de mensagem da IA */
.chat-message.bot p {
    margin: 0;
    padding: 10px 15px;
    background-color: #f1f0f0;
    /* Arredonda 3 cantos, deixando o da esquerda reto para o "rabicho" */
    border-radius: 5px 20px 20px 20px; 
    position: relative; /* Necessário para a ponta do balão */
    color: #333; /* Garante que o texto dentro do balão seja escuro */
}

/* Cria o "rabicho" do balão de conversa com CSS */
.chat-message.bot p::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #f1f0f0; /* Mesma cor do fundo do balão */
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Garante que a mensagem do usuário não seja afetada */
.chat-message.user p {
    margin: 0;
}

/* --- ESTILOS PARA O SELETOR DE CICLO DE FATURAMENTO --- */
.billing-cycle-toggle {
    background-color: #e9ecef;
    border-radius: 30px;
    display: inline-flex;
    padding: 5px;
    margin-top: 20px;
}

.billing-cycle-toggle button {
    background: transparent;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--cor-secundaria);
    transition: all 0.2s ease-in-out;
}

.billing-cycle-toggle button.active {
    background-color: var(--cor-primaria);
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.billing-cycle-toggle button span {
    font-weight: normal;
    font-size: 12px;
    opacity: 0.8;
}
/* --- LAYOUT FINAL E ROBUSTO PARA CABEÇALHO --- */

.main-header {
    background: linear-gradient(to right, #1C2F6D, #048DEB, #00d4ff);
    color: white;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center; /* Alinha verticalmente */
    gap: 15px; /* Adiciona um espaço mínimo entre os elementos */
}

.header-logo {
    height: 35px;
    width: auto;
    flex-shrink: 0; /* Impede que o logo encolha */
}

/* A MÁGICA ACONTECE AQUI */
.header-spacer {
    flex-grow: 1; /* Faz este elemento crescer e ocupar todo o espaço livre */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0; /* Impede que o bloco do usuário encolha */
}

#user-display-name {
    white-space: nowrap; /* Impede que o nome quebre a linha */
    font-weight: 500;
    color: white;
    margin-right: 15px;
    font-size: 14px;
}

.main-header .btn-secondary,
.main-header #logout-btn {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.main-header .btn-secondary:hover,
.main-header #logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
/* --- ESTILOS PARA BOTÕES NO HEADER --- */
.header-btn {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 36px;
    height: 36px;
}

.header-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-btn img {
    display: block;
    flex-shrink: 0;
    filter: brightness(0) invert(1); /* Torna as imagens brancas */
    transition: filter 0.2s ease-in-out;
}

.header-btn:hover img {
    filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(255,255,255,0.5));
}

/* Garante que ambos os botões tenham o mesmo tamanho */
#settings-btn,
.support-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* --- AJUSTES NO RODAPÉ DO MODAL DE CONFIGURAÇÕES --- */
#settings-modal .modal-footer {
    justify-content: space-between;
}

/* Garante que o input desabilitado tenha uma aparência legível */
#settings-email:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}
/* --- ESTILOS PARA A ZONA DE PERIGO --- */
.danger-zone {
    border-color: var(--cor-perigo);
}

.danger-zone summary {
    color: var(--cor-perigo);
}

.danger-zone .details-content {
    background-color: #fff5f5;
}

.danger-zone h5 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 16px;
    color: #333;
}

.danger-zone p {
    font-size: 14px;
    color: #555;
    margin-top: 0;
    margin-bottom: 15px;
}
/* --- ESTILOS PARA O GERENCIADOR DE FUNIS --- */
.modal-lg {
    max-width: 900px;
}

.funnel-manager-body {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 400px;
}

.funnel-list-container {
    width: 300px;
    border-right: 1px solid #dfe1e6;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
}

.stage-list-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.funnel-list, .stage-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.funnel-item, .stage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 5px;
}

.funnel-item:hover, .stage-item:hover {
    background-color: #f4f5f7;
}

.funnel-item.active {
    background-color: var(--cor-primaria);
    color: white;
}

.funnel-item input, .stage-item input {
    border: none;
    background: transparent;
    font-size: 1em;
    flex-grow: 1;
    padding: 5px;
}

.funnel-item.active input {
    color: white;
}

.stage-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
}
.stage-item-actions button:hover {
    opacity: 1;
}

#funnel-management-section p {
    font-size: 14px;
    color: #5e6c84;
}
/* --- ESTILOS PARA O GERENCIADOR DE FUNIS --- */
.modal-lg {
    max-width: 900px;
}

.funnel-manager-body {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 400px;
}

.funnel-list-container, .stage-list-container {
    display: flex;
    flex-direction: column;
}

.funnel-list-container {
    width: 35%;
    border-right: 1px solid #dfe1e6;
    padding-right: 20px;
}

.stage-list-container {
    flex-grow: 1;
}

.funnel-list, .stage-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.funnel-item, .stage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    border: 1px solid transparent;
}

.funnel-item .name, .stage-item .name {
    flex-grow: 1;
    cursor: pointer;
}

.funnel-item:hover, .stage-item:hover {
    background-color: #f4f5f7;
}

.funnel-item.active {
    background-color: var(--cor-primaria);
    color: white;
    border-color: var(--cor-primaria-hover);
}

.item-actions {
    display: flex;
    gap: 5px;
}

.item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    padding: 5px;
}
.item-actions button:hover {
    opacity: 1;
}
.funnel-item.active .item-actions button {
    opacity: 0.8;
}

.add-item-form {
    display: flex;
    gap: 10px;
}
.add-item-form input {
    flex-grow: 1;
}

#funnel-management-section p {
    font-size: 14px;
    color: #5e6c84;
    margin-top: 0;
}
/* --- ESTILOS PARA O SELETOR DE TEMA (SWITCH) --- */

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: var(--cor-primaria);
}
input:checked + .slider:before {
    transform: translateX(22px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}

/* --- TEMA ESCURO (DARK MODE) --- */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .kanban-column {
    background-color: #2c2c2c;
}

body.dark-mode .kanban-card {
    background-color: #3d3d3d;
    color: #f0f0f0;
    box-shadow: 0 1px 2px rgba(0,0,0,.5);
}

body.dark-mode .card-info {
    color: #a0a0a0;
}

body.dark-mode .modal-content {
    background-color: #2c2c2c;
    color: #f0f0f0;
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: #4a4a4a;
}

body.dark-mode .summary-panel {
    background-color: #252525;
    border-color: #4a4a4a;
}

body.dark-mode .form-section-details {
    border-color: #4a4a4a;
}
body.dark-mode .form-section-details summary {
    background-color: #3d3d3d;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: #3d3d3d;
    border-color: #5a5a5a;
    color: #f0f0f0;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #a0a0a0;
}

body.dark-mode .funnel-nav,
body.dark-mode .controls-section {
    background-color: #252525;
    border-color: #4a4a4a;
}

body.dark-mode .funnel-btn {
    color: #b0b0b0;
}
body.dark-mode .funnel-btn:hover {
    background-color: #3d3d3d;
}
body.dark-mode .funnel-btn.active {
    background-color: var(--cor-primaria);
    color: white;
}
/* --- ESTILOS PARA O NOVO MODAL DE CONFIGURAÇÕES COM ABAS --- */
.settings-body {
    display: flex;
    min-height: 400px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px;
    border-right: 1px solid #dfe1e6;
    min-width: 200px;
}

.settings-tab-btn {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: #42526e;
    transition: background-color 0.2s, color 0.2s;
}

.settings-tab-btn:hover {
    background-color: #f4f5f7;
}

.settings-tab-btn.active {
    background-color: var(--cor-primaria);
    color: white;
}

.settings-tab-btn.danger {
    color: var(--cor-perigo);
}
.settings-tab-btn.danger:hover {
    background-color: #ffebee;
}
.settings-tab-btn.danger.active {
    background-color: var(--cor-perigo);
    color: white;
}


.settings-content {
    padding: 20px;
    flex-grow: 1;
}

.settings-tab-panel {
    display: none;
}

.settings-tab-panel.active {
    display: block;
}

.settings-content h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
}

.settings-content .details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.settings-content .details-content .full-width-detail {
    grid-column: 1 / -1;
}
.danger-zone-content {
    border: 2px solid var(--cor-perigo);
    border-radius: 6px;
    padding: 15px;
    background-color: #fff5f5;
}

/* Ajustes no rodapé do modal */

#settings-modal .theme-switcher {
    gap: 10px;
}

/* --- AJUSTES PARA TEMA ESCURO NO NOVO MODAL --- */

body.dark-mode .settings-nav {
    border-color: #4a4a4a;
}
body.dark-mode .settings-tab-btn {
    color: #b0b0b0;
}
body.dark-mode .settings-tab-btn:hover {
    background-color: #3d3d3d;
}
body.dark-mode .settings-tab-btn.active {
    background-color: var(--cor-primaria);
    color: white;
}
body.dark-mode .settings-tab-btn.danger {
    color: #ef9a9a;
}
body.dark-mode .settings-tab-btn.danger:hover {
    background-color: #4a2e2e;
}
body.dark-mode .settings-tab-btn.danger.active {
    background-color: var(--cor-perigo);
    color: white;
}
body.dark-mode .danger-zone-content {
    background-color: #4a2e2e;
    border-color: #ef9a9a;
}
/* --- CORREÇÕES FINAIS DE LAYOUT --- */
/* --- CORREÇÃO FINAL DO RODAPÉ DO MODAL DE CONFIGURAÇÕES --- */

/* Garante que o rodapé alinhe os grupos de itens (tema e ações) à direita */
#settings-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Força tudo para a direita */
    gap: 25px; /* Espaço entre o seletor de tema e os botões de ação */
}

/* Garante que os itens DENTRO do seletor de tema fiquem juntos */
#settings-modal .theme-switcher {
    display: flex;
    align-items: center;
    gap: 10px; /* Espaço entre "Tema:", "Light/Dark" e o interruptor */
}

/* Garante que os botões de ação fiquem juntos */
#settings-modal .footer-actions {
    display: flex;
    gap: 10px;
}

#theme-status-text {
    font-weight: 500;
    min-width: 40px; /* Garante que o layout não quebre ao trocar o texto */
}
/* --- CORREÇÃO FINAL DO RODAPÉ DO MODAL --- */

/* Alinha os dois grupos principais (tema e botões) à direita */
#settings-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
}

/* Alinha os itens DENTRO do seletor de tema */
#settings-modal .theme-switcher {
    display: flex;
    align-items: center;
    gap: 10px; 
}

/* Alinha os botões de ação juntos */
#settings-modal .footer-actions {
    display: flex;
    gap: 10px;
}

#theme-status-text {
    font-weight: 500;
    min-width: 40px;
}
.reload-btn img {
  transition: transform 0.18s cubic-bezier(.4,2,.6,1), filter 0.18s;
  filter: drop-shadow(0 1px 4px rgba(50,84,169,0.09));
  margin-left: 10px;
  margin-bottom: 0;
}
.kanban-column {
  position: relative; /* Para posicionar o botão no topo à direita */
}
.reload-btn:hover img {
  transform: rotate(18deg) scale(1.07);
  filter: drop-shadow(0 2px 10px rgba(50,84,169,0.20));
  opacity: 1;
}

/* === PLANOS === */
.plans-header {
    text-align: center;
    margin: 40px 0 20px 0;
}

.plans-header h2 {
    color: #3254A9;
    font-size: 2rem;
    margin-bottom: 10px;
}
.plans-header p {
    color: #5e6c84;
    font-size: 1.08rem;
}

.billing-cycle-toggle {
    background: #e9ecef;
    border-radius: 28px;
    display: inline-flex;
    padding: 5px;
    margin-top: 26px;
    margin-bottom: 0;
}

.billing-cycle-toggle button {
    background: transparent;
    border: none;
    border-radius: 24px;
    padding: 11px 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: #42526e;
    transition: all 0.22s;
}

.billing-cycle-toggle button.active {
    background: #3254A9;
    color: #fff;
    box-shadow: 0 2px 6px rgba(50,84,169,0.08);
}

.billing-cycle-toggle button span {
    font-weight: normal;
    font-size: 12px;
    opacity: 0.7;
}

.plans-container {
    display: flex;
    gap: 38px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    margin: 36px auto 55px auto;
}

.plan-card {
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 6px 22px rgba(41,74,125,0.08);
    padding: 36px 28px 30px 28px;
    width: 325px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: box-shadow 0.20s, transform 0.13s;
}
.plan-card:hover {
    box-shadow: 0 10px 32px rgba(50,84,169,0.14);
    transform: translateY(-4px) scale(1.017);
}
.plan-card.recommended {
   border: 2.5px solid #3254A9;
   box-shadow: 0 12px 48px rgba(50,84,169,0.13);
   position: relative;
   transform: scale(1.062);
  z-index: 2;
}

.plan-card.recommended::before {
    content: "MAIS POPULAR";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: #3254A9;
    color: #fff;
    font-size: .91rem;
    font-weight: 600;
    padding: 4px 22px;
    border-radius: 22px;
    letter-spacing: 0.04em;
}

.plan-title, .plan-card h3 {
    font-size: 1.22rem;
    font-weight: bold;
    margin-bottom: 14px;
    text-align: center;
}

.plan-price, .plan-card .price {
    font-size: 2.13rem;
    font-weight: bold;
    color: #3254A9;
    margin-bottom: 10px;
    margin-top: -3px;
}

.plan-period {
    font-size: 1rem;
    color: #5e6c84;
    margin-bottom: 13px;
    font-weight: 400;
}

.plan-card p {
    font-size: 12px;
    color: #5e6c84;
    margin-top: -5px;
    margin-bottom: 17px;
}

.features {
    list-style: none;
    padding: 0;
    margin: 14px 0 25px 0;
    width: 100%;
}
.features li {
    font-size: 1rem;
    margin-bottom: 13px;
    padding-left: 1.6em;
    position: relative;
    color: #333;
}
.features li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.12em;
}

.plan-action {
    margin-top: auto;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(to right,#007bff,#3254A9);
    color: #fff;
    padding: 13px 26px;
    border-radius: 28px;
    border: none;
    font-size: 1.08rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s, box-shadow .11s;
    outline: none;
    box-shadow: 0 2px 13px rgba(50,84,169,0.04);
    letter-spacing: .01em;
    display: block;
    text-align: center;
}
.btn-primary:hover {
    background: linear-gradient(to right,#3254A9,#007bff);
    color: #fff;
    box-shadow: 0 8px 22px rgba(50,84,169,0.17);
}

/* Responsivo */
@media (max-width:900px){
    .plans-container { flex-direction:column; align-items: center;}
    .plan-card { width:98%; max-width:398px;}
}

/* --- ESTILOS CORRIGIDOS PARA O BALÃO E BOTÃO DE FECHAR --- */

/* 1. Garante que o balão flutue e não empurre o ícone */
.chat-bubble {
    /* As duas propriedades mais importantes para o alinhamento correto */
    position: absolute; /* Tira o balão do fluxo e o faz flutuar */
    
    /* Posição original do balão, acima do ícone principal */
    bottom: 90px;
    right: 10px;

    /* Adiciona espaço interno para o botão 'X' não ficar sobre o texto */
    padding-right: 35px;

    /* Mantém os outros estilos que você já tinha */
    background-color: white;
    color: #333;
    padding: 10px 15px;
    padding-right: 35px; /* Repetido para garantir a aplicação */
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    animation: fadeInBubble 0.5s 1s forwards, bobBubble 3s infinite 1.5s;
}

/* 2. Estiliza e posiciona o botão 'X' DENTRO do balão */
.chat-bubble-close-btn {
    position: absolute; /* Posiciona o 'X' em relação ao balão */
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
}

.chat-bubble-close-btn:hover {
    color: #333;
}

/* --- ESTILOS PARA O BOTÃO DE ABRIR LINK NO MODAL --- */

.label-with-link {
    display: flex;
    align-items: center;
    gap: 8px; /* Espaço entre o texto e o ícone */
    margin-bottom: 4px; /* Mantém o espaçamento original da label */
}

.label-with-link label {
    margin-bottom: 0; /* Remove a margem da label, pois a div agora controla */
}

.open-link-btn {
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--cor-primaria);
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.open-link-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

body.dark-mode .open-link-btn {
    color: #8cb4f5; /* Uma cor azul mais clara para o tema escuro */
}
.open-link-btn svg {
    display: block; /* Garante que o ícone não tenha espaçamento extra */
}

/* --- ESTILOS PARA O MODAL DE TAREFAS --- */
#tasks-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-group h4 {
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #dfe1e6;
    padding-bottom: 5px;
    color: var(--cor-primaria);
}

body.dark-mode .task-group h4 {
    border-color: #4a4a4a;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
    margin-bottom: 8px;
}

body.dark-mode .task-item {
    background-color: #3d3d3d;
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #6c757d;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-title {
    font-weight: 500;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #5e6c84;
}

.task-due-date {
    font-weight: 600;
}

.task-due-date.overdue {
    color: var(--cor-perigo);
}

.task-lead-link {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

body.dark-mode .task-lead-link {
    background-color: #2c2c2c;
    color: #b0b0b0;
}

/* --- ESTILO PARA O BOTÃO DE EXCLUIR TAREFA --- */
.task-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    opacity: 0.5;
    transition: opacity 0.2s;
    color: var(--cor-perigo);
}

.task-delete-btn:hover {
    opacity: 1;
}

/* --- CORREÇÃO FINAL PARA BOTÕES DO FORMULÁRIO DE TAREFAS --- */

/* 1. Estiliza o contêiner dos botões 'Salvar' e 'Cancelar' */
.form-actions {
    display: flex;
    justify-content: flex-end; /* Alinha os botões à direita */
    gap: 10px; /* Cria um espaço entre os botões */
}

/* 2. Aplica o tamanho correto aos botões 'Salvar' e 'Cancelar' */
.form-actions .btn-primary,
.form-actions .btn-secondary {
    padding: 8px 15px !important; /* !important para garantir a sobreposição */
    font-size: 14px !important;
    border-radius: 8px !important;
    width: auto; /* Garante que a largura se ajuste ao texto */
    height: auto;
    line-height: 1.2;
}

/* 3. Garante que o botão 'Adicionar Tarefa' (verde) também tenha o tamanho certo */
#tasks-modal #add-task-btn {
    padding: 8px 15px;
    font-size: 14px;
}
/* --- ESTILO PARA O FILTRO DE TAREFAS --- */
.task-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto; /* Empurra o filtro para a esquerda do botão 'X' */
    padding-right: 20px;
    font-size: 14px;
    color: #5e6c84;
}

body.dark-mode .task-filter {
    color: #b0b0b0;
}

/* Estilo para o botão de editar tarefa */
.task-edit-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    opacity: 0.5;
    transition: opacity 0.2s;
    color: var(--cor-secundaria);
}

.task-edit-btn:hover {
    opacity: 1;
}

.task-edit-form {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
}
.task-edit-form input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.task-edit-title {
    flex-grow: 1;
}
.task-edit-actions {
    display: flex;
    gap: 5px;
}

/* --- ESTILOS PARA O FILTRO DO KANBAN --- */
.controls-section {
    position: relative; /* Necessário para posicionar o painel de filtros */
    justify-content: flex-end; /* Alinha os botões de ação à direita */
}

.filter-panel {
    position: absolute;
    top: 100%; /* Posiciona abaixo da barra de controles */
    right: 0;
    z-index: 10;
    background-color: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 20px;
    width: 100%;
    max-width: 600px; /* Largura máxima do painel */
    display: none; /* Começa escondido */
    flex-direction: column;
    gap: 15px;
}

.filter-panel.active {
    display: flex; /* Mostra o painel quando a classe 'active' é adicionada */
}

.filter-panel h4 {
    margin-top: 0;
    margin-bottom: 5px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-filter-group {
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.date-filter-group > div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-panel input,
.filter-panel select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Tema Escuro */
body.dark-mode .filter-panel {
    background-color: #2c2c2c;
    border-color: #4a4a4a;
}

/* --- ESTILOS PARA O NOVO CABEÇALHO DO KANBAN --- */

.kanban-header {
    background-color: #ffffff;
    padding: 10px 30px;
    border-bottom: 1px solid #dfe1e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative; /* Para o painel de filtro */
}

body.dark-mode .kanban-header {
    background-color: #252525;
    border-color: #4a4a4a;
}

.kanban-header-title {
    font-size: 18px;
    font-weight: 600;
    color: #42526e;
    margin: 0;
    text-align: center;
    flex-grow: 1; /* Faz o título ocupar o espaço central */
}

body.dark-mode .kanban-header-title {
    color: #b0b0b0;
}

/* Transforma a antiga nav de botões em abas */
.funnel-nav-tabs {
    display: flex;
    gap: 5px;
    padding: 0;
    border: none;
    background: none;
}

/* Estilo de aba para os botões do funil */
.funnel-btn {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent; /* Borda inferior invisível */
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #5e6c84;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

body.dark-mode .funnel-btn {
    color: #b0b0b0;
}

.funnel-btn:hover {
    background-color: #f4f5f7; /* Um fundo sutil ao passar o mouse */
}

body.dark-mode .funnel-btn:hover {
    background-color: #3d3d3d;
}

/* Estilo para a aba ativa */
.funnel-btn.active {
    color: var(--cor-primaria);
    border-bottom-color: var(--cor-primaria);
    background-color: transparent;
}

.kanban-header .actions-container {
    flex-shrink: 0; /* Impede que os botões encolham */
}
/* --- ESTILOS PARA O DROPDOWN DE FUNIL --- */

.funnel-dropdown {
    position: relative; /* Essencial para posicionar a lista suspensa */
    z-index: 11; /* Para a lista ficar sobre o quadro kanban */
}

#funnel-dropdown-btn {
    background-color: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #42526e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

#funnel-dropdown-btn:hover {
    background-color: #f4f5f7;
}

#funnel-dropdown-list {
    position: absolute;
    top: 110%; /* Ligeiramente abaixo do botão */
    left: 0;
    background-color: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    display: none; /* Começa escondida */
}

#funnel-dropdown-list.active {
    display: block; /* Mostra a lista */
}

.funnel-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.funnel-dropdown-item:hover {
    background-color: #f4f5f7;
}

.funnel-dropdown-item.active {
    color: var(--cor-primaria);
    font-weight: bold;
}

/* Tema Escuro */
body.dark-mode #funnel-dropdown-btn {
    background-color: #2c2c2c;
    border-color: #4a4a4a;
    color: #b0b0b0;
}
body.dark-mode #funnel-dropdown-btn:hover {
    background-color: #3d3d3d;
}
body.dark-mode #funnel-dropdown-list {
    background-color: #2c2c2c;
    border-color: #4a4a4a;
}
body.dark-mode .funnel-dropdown-item:hover {
    background-color: #3d3d3d;
}

/* --- AJUSTES FINAIS NO PAINEL DE FILTRO --- */
.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

body.dark-mode .filter-panel-header {
    border-color: #4a4a4a;
}

.filter-panel-header h4 {
    margin: 0;
}

.filter-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}
/* --- ESTILOS CUSTOMIZADOS PARA AS BARRAS DE ROLAGEM --- */

/* Força a barra de rolagem horizontal a sempre aparecer */
.kanban-board::-webkit-scrollbar {
    height: 14px; /* Altura da barra horizontal */
    -webkit-appearance: none;
}

.cards-container::-webkit-scrollbar {
    width: 12px; /* Largura da barra vertical das colunas */
}

/* A "pista" por onde a barra corre - mais visível */
.kanban-board::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.cards-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

/* A alça da barra de rolagem - mais chamativa */
.kanban-board::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 8px;
    border: 2px solid #f1f3f4;
    min-width: 20px; /* Garante tamanho mínimo visível */
}

.cards-container::-webkit-scrollbar-thumb {
    background-color: #bdc3c7;
    border-radius: 10px;
    border: 3px solid #e9ecef;
}

/* Efeito ao passar o mouse */
.kanban-board::-webkit-scrollbar-thumb:hover {
    background-color: #0056b3;
}

.cards-container::-webkit-scrollbar-thumb:hover {
    background-color: #a2a9af;
}

/* --- AJUSTES PARA O TEMA ESCURO --- */
body.dark-mode .kanban-board::-webkit-scrollbar-track,
body.dark-mode .cards-container::-webkit-scrollbar-track {
    background: #2c2c2c;
}

body.dark-mode .kanban-board::-webkit-scrollbar-thumb,
body.dark-mode .cards-container::-webkit-scrollbar-thumb {
    background-color: #555;
    border-color: #2c2c2c;
}

body.dark-mode .kanban-board::-webkit-scrollbar-thumb:hover,
body.dark-mode .cards-container::-webkit-scrollbar-thumb:hover {
    background-color: #777;
}

/* --- ESTILOS PARA O PAINEL DE RELATÓRIOS --- */

.report-filters {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background-color: var(--cor-fundo-claro);
    border-radius: 8px;
    margin-bottom: 20px;
}

body.dark-mode .report-filters {
    background-color: #252525;
}

.custom-date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.kpi-card {
    background-color: var(--cor-fundo-claro);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dfe1e6;
}

body.dark-mode .kpi-card {
    background-color: #2c2c2c;
    border-color: #4a4a4a;
}

.kpi-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--cor-secundaria);
    margin: 0 0 10px 0;
}

.kpi-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--cor-primaria);
    margin: 0;
}

.chart-container {
    background-color: var(--cor-fundo-claro);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dfe1e6;
    grid-column: 1 / -1; /* Faz o gráfico ocupar a largura total */
}

body.dark-mode .chart-container {
    background-color: #2c2c2c;
    border-color: #4a4a4a;
}

/* --- ESTILOS PARA O BANNER DE TESTE GRATUITO --- */
.trial-banner {
    background-color: #ffc107; /* Um amarelo-alerta, mas não agressivo */
    color: #333;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
}

.trial-banner p {
    margin: 0;
}

.trial-banner a {
    color: #0056b3; /* Um azul escuro para o link */
    font-weight: 700;
    text-decoration: underline;
}

.trial-banner a:hover {
    color: #003d7c;
}
.inline-form-group {
    display: flex;
    gap: 10px;
}
.form-divider {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: left;
}



/* Lógica para mostrar/esconder as "páginas" */
.view {
    display: none;
}
.view.active {
    display: block;
}

/* --- CSS DEFINITIVO PARA O LAYOUT GERAL E KANBAN --- */

/* --- ESTRUTURA PRINCIPAL --- */
.main-header-reborn {
    background: #0c1a3e;
    border-bottom: 1px solid #dfe1e6;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    flex-shrink: 0;
}

.content-area {
    flex-grow: 1;
    overflow: hidden;
    padding: 0;
    display: flex;
    width: 100%;
}

/* --- NAVEGAÇÃO SUPERIOR --- */
.header-left { display: flex; align-items: center; height: 100%; }
.main-nav { display: flex; align-items: center; height: 100%; flex-grow: 1; justify-content: center; }
.header-logo { height: 30px; margin-right: 25px; }
.nav-item {
    display: flex;
    align-items: center;
    padding: 0 15px 15px 15px; /* Aumenta padding inferior para afastar linha */
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    height: 100%;
    box-sizing: border-box;
}
.nav-item:hover {
    color: white;
}
.nav-item.active {
    color: white;
    border-bottom-color: white;
}

/* --- LÓGICA DAS PÁGINAS (VIEWS) --- */
.view { display: none; width: 100%; height: 100%; }
.view.active { display: block; }

/* --- PÁGINAS SIMPLES (INÍCIO, TAREFAS, RELATÓRIOS) --- */
#view-inicio, #view-tarefas, #view-relatorios {
    padding: 20px 30px;
    overflow-y: auto;
}

/* --- PÁGINA DE NEGOCIAÇÕES (KANBAN) --- */
#view-negociacoes.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

#view-negociacoes .kanban-header {
    flex-shrink: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #dfe1e6;
}

#view-negociacoes .kanban-wrapper {
    height: 100%;
}

#view-negociacoes .kanban-board {
    height: 100%;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 20px;
    padding: 20px 30px;
    flex-wrap: nowrap;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#view-negociacoes .kanban-board::-webkit-scrollbar {
    display: none;
}

/* --- TEMA ESCURO (DARK MODE) --- */
body.dark-mode .main-header-reborn {
    background: #0c1a3e; /* Mantém a mesma cor no tema escuro */
    border-color: #4a4a4a;
}
body.dark-mode #view-negociacoes .kanban-header {
    background: #252525;
    border-color: #4a4a4a;
}
body.dark-mode .nav-item { color: rgba(255, 255, 255, 0.8); }
body.dark-mode .nav-item:hover { color: white; }
body.dark-mode .nav-item.active { color: white; border-bottom-color: white; }
body.dark-mode .content-area { background-color: #1a1a1a; }

/* === PÁGINA DE INÍCIO - HUB DE ACESSOS === */

.inicio-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Header */
.inicio-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1C2F6D 0%, #3254A9 50%, #00d4ff 100%);
    border-radius: 12px;
    color: white;
}

.inicio-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.inicio-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Navigation Grid */
.main-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.nav-card {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color, #0c1a3e), var(--accent-light, #2c4ba3));
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.nav-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent-color, #0c1a3e), var(--accent-light, #2c4ba3));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-card h3 {
    margin: 0 0 10px 0;
    color: #0c1a3e;
    font-size: 1.3rem;
    font-weight: 600;
}

.nav-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.4;
}

.nav-card.primary {
    --accent-color: #0c1a3e;
    --accent-light: #2c4ba3;
}

.nav-card.secondary {
    --accent-color: #28a745;
    --accent-light: #34ce57;
}

.nav-card.tertiary {
    --accent-color: #6f42c1;
    --accent-light: #8a63d2;
}

/* Tools Section */
.tools-section {
    margin-bottom: 40px;
}

.tools-section h2 {
    color: #0c1a3e;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    text-align: center;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.tool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.tool-badge {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tool-card.prospecta {
    background: linear-gradient(135deg, #0c1a3e 0%, #1e2a5e 100%);
    color: white;
    border: 2px solid #3254A9;
}

.tool-card.prospecta h4,
.tool-card.prospecta p {
    color: white;
}

.tool-card.prospecta .tool-icon {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.tool-card.prospecta .tool-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.tool-card.prospecta .tool-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #0c1a3e;
    font-weight: 700;
}

.tool-card.academy {
    background: linear-gradient(135deg, #1e4d2b 0%, #2d5a34 100%);
    color: white;
    border: 2px solid #28a745;
}

.tool-card.academy h4,
.tool-card.academy p {
    color: white;
}

.tool-card.academy .tool-icon {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.tool-card.academy .tool-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.tool-card.academy .tool-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #1e4d2b;
    font-weight: 700;
}

.tool-card.utm .tool-icon {
    background: linear-gradient(135deg, #9c27b0, #673ab7);
    color: white;
}

.tool-card.utm .tool-badge {
    background: #f3e5f5;
    color: #7b1fa2;
}

.tool-card h4 {
    margin: 0 0 10px 0;
    color: #0c1a3e;
    font-size: 1.1rem;
    font-weight: 600;
}

.tool-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Quick Links */
.quick-links {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quick-links h2 {
    color: #0c1a3e;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.quick-link:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #495057;
}

.quick-link-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.quick-link-icon svg {
    width: 100%;
    height: 100%;
}

.quick-link.whatsapp .quick-link-icon {
    color: #25d366;
}

.quick-link.whatsapp:hover {
    background: #dcf8c6;
    border-color: #25d366;
}

.quick-link.instagram .quick-link-icon {
    color: #e91e63;
}

.quick-link.instagram:hover {
    background: #fce4ec;
    border-color: #e91e63;
}

.quick-link.youtube .quick-link-icon {
    color: #ff0000;
}

.quick-link.youtube:hover {
    background: #ffebee;
    border-color: #ff0000;
}

.quick-link.linkedin .quick-link-icon {
    color: #0077b5;
}

.quick-link.linkedin:hover {
    background: #e3f2fd;
    border-color: #0077b5;
}

.quick-link span {
    font-weight: 500;
    font-size: 0.9rem;
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .inicio-container {
        padding: 20px;
    }

    .inicio-header {
        padding: 20px;
        margin-bottom: 30px;
    }

    .inicio-header h1 {
        font-size: 1.8rem;
    }

    .main-nav-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-card,
    .tool-card {
        padding: 20px;
    }
}

/* Corrigir modal de configurações no tema escuro */
body.dark-mode .settings-body {
    background-color: #2c2c2c;
}
body.dark-mode .settings-content {
    background-color: #2c2c2c;
    color: #f0f0f0;
}

/* Tema escuro para página de início */
body.dark-mode .inicio-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
}

body.dark-mode .nav-card,
body.dark-mode .tool-card,
body.dark-mode .quick-links {
    background-color: #2c2c2c;
    border-color: #4a4a4a;
}

body.dark-mode .nav-card h3,
body.dark-mode .tool-card h4,
body.dark-mode .quick-links h2,
body.dark-mode .tools-section h2 {
    color: #ffffff;
}

body.dark-mode .quick-link {
    background: #3c3c3c;
    border-color: #4a4a4a;
    color: #f0f0f0;
}

body.dark-mode .quick-link:hover {
    background: #4c4c4c;
    color: #f0f0f0;
}

body.dark-mode .quick-link.whatsapp:hover {
    background: #1e4a2e;
}

body.dark-mode .quick-link.instagram:hover {
    background: #4a1e3e;
}

body.dark-mode .quick-link.youtube:hover {
    background: #4a1e1e;
}

body.dark-mode .quick-link.linkedin:hover {
    background: #1e3a4a;
}

body.dark-mode .tool-badge {
    background: #4a4a4a;
    color: #f0f0f0;
}

/* Cards especiais das ferramentas ALT em modo escuro */
body.dark-mode .tool-card.prospecta {
    background: linear-gradient(135deg, #0a1426 0%, #1a2847 100%);
    border-color: #3254A9;
}

body.dark-mode .tool-card.academy {
    background: linear-gradient(135deg, #1a3d20 0%, #2a4f30 100%);
    border-color: #28a745;
}

body.dark-mode .tool-card.prospecta .tool-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #0c1a3e;
}

body.dark-mode .tool-card.academy .tool-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #1e4d2b;
}

/* Layout especial para cards com logo apenas */
.tool-card.logo-only {
    text-align: center;
    padding: 30px 25px;
}

.tool-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tool-logo-container img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.tool-card.logo-only .tool-badge {
    position: relative;
    margin: 0;
}

.tool-card.logo-only p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Ajustes específicos para modo escuro */
body.dark-mode .tool-logo-container img {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

/* === PÁGINA DE RELATÓRIOS/ANÁLISES === */
.relatorios-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.relatorios-container h2 {
    color: #0c1a3e;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Ajustes para os filtros e dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Responsive para relatórios */
@media (max-width: 768px) {
    .relatorios-container {
        padding: 20px;
    }

    .relatorios-container h2 {
        font-size: 1.5rem;
    }
}

/* Tema escuro para página de relatórios */
body.dark-mode .relatorios-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
}

body.dark-mode .relatorios-container h2 {
    color: #ffffff;
}

/* === PÁGINA DE TAREFAS === */
.tarefas-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.tarefas-container h2 {
    color: #0c1a3e;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Responsive para tarefas */
@media (max-width: 768px) {
    .tarefas-container {
        padding: 20px;
    }

    .tarefas-container h2 {
        font-size: 1.5rem;
    }
}

/* Tema escuro para página de tarefas */
body.dark-mode .tarefas-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
}

body.dark-mode .tarefas-container h2 {
    color: #ffffff;
}

/* === HEADER DA PÁGINA DE TAREFAS === */
.tarefas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.tarefas-header h2 {
    margin: 0;
    text-align: left;
}

/* Toggle de Visualização */
.view-toggle {
    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.view-toggle-btn:hover {
    background: #f8f9fa;
}

.view-toggle-btn.active {
    background: #0c1a3e;
    color: white;
}

/* === CALENDÁRIO === */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-controls h3 {
    margin: 0;
    color: #0c1a3e;
    font-size: 1.5rem;
    font-weight: 600;
}

.calendar-nav-btn {
    background: white;
    border: 1px solid #dfe1e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
}

.calendar-nav-btn:hover {
    background: #f8f9fa;
    border-color: #0c1a3e;
    color: #0c1a3e;
}

.calendar-grid {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.calendar-day-header {
    padding: 15px 8px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 120px;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 8px;
    position: relative;
    background: white;
    transition: background-color 0.2s ease;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.today {
    background: #e3f2fd;
}

.calendar-day-number {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    font-size: 14px;
}

.calendar-day.other-month .calendar-day-number {
    color: #adb5bd;
}

.calendar-day.today .calendar-day-number {
    color: #1976d2;
    background: #1976d2;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.calendar-tasks {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 90px;
    overflow: hidden;
}

.calendar-task {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-task:hover {
    background: #1976d2;
    color: white;
}

.calendar-task.completed {
    background: #f5f5f5;
    color: #6c757d;
    text-decoration: line-through;
}

.calendar-task.completed:hover {
    background: #6c757d;
    color: white;
}

.calendar-task.overdue {
    background: #ffebee;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
}

.calendar-task.overdue:hover {
    background: #d32f2f;
    color: white;
}

.calendar-task.on-time {
    background: #e8f5e8;
    color: #28a745;
    border-left: 4px solid #28a745;
}

.calendar-task.on-time:hover {
    background: #28a745;
    color: white;
}

.calendar-task.high-priority {
    font-weight: bold;
    border-right: 4px solid #ff9800 !important;
}

.calendar-task.high-priority:hover {
    border-right: 4px solid #ff9800 !important;
}

/* === LEGENDA DE CORES === */
.color-legend {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: 20px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 16px;
    height: 12px;
    border-radius: 3px;
    border-left: 3px solid;
}

.legend-color.overdue {
    background: #ffebee;
    border-left-color: #d32f2f;
}

.legend-color.on-time {
    background: #e8f5e8;
    border-left-color: #28a745;
}

.legend-color.completed {
    background: #f5f5f5;
    border-left-color: #6c757d;
}

/* === INDICADORES DE TAREFAS NOS CARDS === */
.task-indicators {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.task-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    cursor: help;
}

.task-indicator.task-overdue {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #f8bbd9;
}

.task-indicator.task-today {
    background: #fff3e0;
    color: #ff9800;
    border: 1px solid #ffcc80;
}

.task-indicator.task-upcoming {
    background: #e8f5e8;
    color: #28a745;
    border: 1px solid #a5d6a7;
}

/* Hover effect */
.task-indicator:hover {
    transform: scale(1.05);
    transition: transform 0.1s ease;
}

.task-indicator.task-overdue:hover {
    background: #d32f2f;
    color: white;
}

.task-indicator.task-today:hover {
    background: #ff9800;
    color: white;
}

.task-indicator.task-upcoming:hover {
    background: #28a745;
    color: white;
}

/* Dark mode support */
body.dark-mode .task-indicators {
    border-top-color: #444;
}

body.dark-mode .task-indicator.task-overdue {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.3);
}

body.dark-mode .task-indicator.task-today {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    border-color: rgba(255, 152, 0, 0.3);
}

body.dark-mode .task-indicator.task-upcoming {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.calendar-more-tasks {
    color: #6c757d;
    font-size: 10px;
    margin-top: 2px;
    cursor: pointer;
}

.calendar-more-tasks:hover {
    color: #0c1a3e;
}

/* Responsivo */
@media (max-width: 768px) {
    .tarefas-header {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }

    .calendar-day-header {
        padding: 10px 4px;
        font-size: 12px;
    }

    .calendar-task {
        font-size: 10px;
        padding: 1px 4px;
    }
}

/* Tema escuro */
body.dark-mode .view-toggle {
    background: #2c2c2c;
}

body.dark-mode .view-toggle-btn {
    color: #f0f0f0;
}

body.dark-mode .view-toggle-btn:hover {
    background: #3c3c3c;
}

body.dark-mode .view-toggle-btn.active {
    background: #0c1a3e;
}

body.dark-mode .calendar-controls h3 {
    color: #ffffff;
}

body.dark-mode .calendar-nav-btn {
    background: #2c2c2c;
    border-color: #4a4a4a;
    color: #f0f0f0;
}

body.dark-mode .calendar-nav-btn:hover {
    background: #3c3c3c;
    border-color: #0c1a3e;
}

body.dark-mode .calendar-grid {
    background: #2c2c2c;
}

body.dark-mode .calendar-header {
    background: #3c3c3c;
    border-bottom-color: #4a4a4a;
}

body.dark-mode .calendar-day-header {
    color: #f0f0f0;
}

body.dark-mode .calendar-day {
    background: #2c2c2c;
    border-color: #4a4a4a;
    color: #f0f0f0;
}

body.dark-mode .calendar-day:hover {
    background: #3c3c3c;
}

body.dark-mode .calendar-day.other-month {
    background: #1a1a1a;
    color: #6c757d;
}

body.dark-mode .calendar-day.today {
    background: #1a3a5c;
}

body.dark-mode .calendar-day-number {
    color: #f0f0f0;
}

/* === TOOLBAR DO CALENDÁRIO === */
.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    gap: 15px;
}

.calendar-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    background: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: #0c1a3e;
}

.filter-select:focus {
    outline: none;
    border-color: #0c1a3e;
    box-shadow: 0 0 0 2px rgba(12, 26, 62, 0.1);
}

/* Melhorar o clique nos dias do calendário */
.calendar-day {
    cursor: pointer;
    user-select: none;
}

.calendar-day:hover {
    background: #f8f9fa;
    box-shadow: inset 0 0 0 1px #0c1a3e;
}

.calendar-day.other-month:hover {
    background: #e9ecef;
}

.calendar-day.today:hover {
    background: #bbdefb;
}

/* Melhorar visual das tarefas */
.calendar-task {
    position: relative;
}

.calendar-task::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 3px solid currentColor;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.calendar-task:hover::after {
    opacity: 0.7;
}

/* === MODAL DE TAREFA === */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #0c1a3e;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Responsivo para toolbar */
@media (max-width: 768px) {
    .calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-filters {
        justify-content: center;
        flex-wrap: wrap;
    }

    .filter-select {
        flex: 1;
        min-width: 120px;
    }
}

/* Tema escuro para novos elementos */
body.dark-mode .calendar-toolbar {
    background: #2c2c2c;
}

body.dark-mode .filter-select {
    background: #3c3c3c;
    border-color: #4a4a4a;
    color: #f0f0f0;
}

body.dark-mode .filter-select:hover,
body.dark-mode .filter-select:focus {
    border-color: #0c1a3e;
}

body.dark-mode .calendar-day:hover {
    background: #3c3c3c;
    box-shadow: inset 0 0 0 1px #0c1a3e;
}

body.dark-mode .calendar-day.other-month:hover {
    background: #2a2a2a;
}

body.dark-mode .calendar-day.today:hover {
    background: #2a4a6c;
}

body.dark-mode .checkbox-label {
    color: #f0f0f0;
}

/* === TOASTS/NOTIFICAÇÕES === */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid #0c1a3e;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.toast.show {
    transform: translateX(0);
}

.toast.toast-success {
    border-left-color: #28a745;
    background: #f8fff9;
    color: #155724;
}

.toast.toast-error {
    border-left-color: #dc3545;
    background: #fff5f5;
    color: #721c24;
}

.toast.toast-info {
    border-left-color: #17a2b8;
    background: #f6fdff;
    color: #0c5460;
}

/* Tema escuro para toasts */
body.dark-mode .toast {
    background: #2c2c2c;
    color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.dark-mode .toast.toast-success {
    background: #1e3a24;
    color: #8bc34a;
}

body.dark-mode .toast.toast-error {
    background: #3a1e1e;
    color: #f44336;
}

body.dark-mode .toast.toast-info {
    background: #1e2a3a;
    color: #2196f3;
}

/* === BUSCA DE LEADS === */
.search-input-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dfe1e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
}

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

.search-result-company {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.search-result-details {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.search-no-results {
    padding: 12px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

/* Tema escuro para busca de leads */
body.dark-mode .search-results {
    background: #2c2c2c;
    border-color: #4a4a4a;
}

body.dark-mode .search-result-item {
    border-bottom-color: #4a4a4a;
}

body.dark-mode .search-result-item:hover {
    background: #3c3c3c;
}

body.dark-mode .search-result-company {
    color: #f0f0f0;
}

body.dark-mode .search-result-details {
    color: #adb5bd;
}

body.dark-mode .search-no-results {
    color: #adb5bd;
}

