/* --- RESET CSS PARA ELIMINAR ESPAÇOS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

/* --- EFEITO DE EMOJIS ESTÁTICOS COM APARIÇÃO --- */
#floating-emojis {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0; /* Garante que fique atrás do card de login */
}

/* Restaura comportamento normal do body */
body {
    overflow: auto;
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
}

.floating-emoji {
    position: absolute;
    font-size: 38px;
    opacity: 0;
    user-select: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    animation: fadeInEmoji 0.5s ease-out forwards;
}

.floating-emoji.static-emoji {
    animation: fadeInEmoji 0.5s ease-out forwards;
}

.floating-emoji.promotor {
    cursor: default;
}

.floating-emoji:not(.promotor) {
    cursor: pointer;
    transition: transform 0.1s ease-out;
}

.floating-emoji:not(.promotor):hover {
    transform: scale(1.3);
}

@keyframes fadeInEmoji {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 0.7;
        transform: scale(1);
    }
}

@keyframes shrinkOut {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

@keyframes growIn {
    0% {
        transform: scale(0);
        opacity: 0;
        filter: brightness(1.8) drop-shadow(0 0 20px rgba(255, 215, 0, 1));
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
        filter: brightness(1.5) drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
        filter: brightness(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    }
}

.floating-emoji.shrink-out {
    animation: shrinkOut 0.3s ease-in forwards;
}

.floating-emoji.grow-in {
    animation: growIn 0.4s ease-out forwards;
    /* Garante que o estado final seja mantido */
    transform: scale(1);
    opacity: 0.7;
    filter: brightness(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Logo na tela inicial */
.logo-img {
    max-width: 180px; /* increased size for better branding */
    display: block;
    margin: 0 auto 48px auto; /* reduced to balance top/bottom spacing */
    /* Keep transparent PNG background visible on the card: remove rounding and shadow */
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Responsivo: reduz a logo em telas muito pequenas */
@media (max-width: 420px) {
    .logo-img { max-width: 140px; margin-bottom: 48px; }
}
/* Posição nas listas de ranking e consultores */
.list-item-pos {
    display: inline-block;
    min-width: 2em;
    font-weight: 700;
    color: var(--accent-color);
    text-align: right;
    margin-right: 8px;
}
/* --- Melhorias na Busca e Lista de Consultores --- */

/* Estilização do container de busca */
.search-container {
    position: relative;
    margin-bottom: 24px;
}

.search-container .search-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--secondary-text);
}

#consultant-search {
    width: 100%;
    padding: 12px 16px 12px 48px; /* Adiciona espaço para o ícone */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#consultant-search:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

/* Ajuste no alinhamento da lista de consultores */
#consultant-stats .list-item {
    display: grid;
    grid-template-columns: 1fr 1fr 60px; /* Nome | Barra | Porcentagem */
    gap: 20px;
    align-items: center;
}

#consultant-stats .list-item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#consultant-stats .list-item-value {
    font-size: 1em;
    min-width: 50px;
    text-align: right;
    font-weight: 600;
}

#consultant-stats .progress-bar-container {
    height: 12px; /* Altura mais fina para a barra */
    background-color: var(--border-color);
}

#consultant-stats .progress-bar {
    height: 12px;
    font-size: 0; /* Remove o texto de dentro da barra */
}
/* --- ESTILOS PARA PAGINAÇÃO --- */
.pagination-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    background-color: #f9fafb;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.page-info {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-text);
    min-width: 90px;
    text-align: center;
}

.btn-icon {
    background-color: transparent;
    color: var(--secondary-text);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-icon:hover {
    background-color: var(--accent-color-light);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(0); /* Remove o efeito de levantar */
}

.btn-icon:disabled {
    background-color: #f9fafb;
    color: #d1d5db;
    cursor: not-allowed;
    border-color: var(--border-color);
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* --- Paleta de Cores VIVA --- */
    --accent-color: #f97316; /* Laranja principal da VIVA */
    --accent-color-dark: #ea580c; /* Laranja mais escuro para hover */
    --accent-color-light: #ffedd5; /* Laranja bem claro, pode ser usado para fundos ou destaques suaves */
    
    /* --- Cores de Base (mantidas para um look profissional) --- */
    --sidebar-bg: #111827;
    --sidebar-text: #d1d5db;
    --sidebar-text-hover: #ffffff;
    --main-bg: #f9fafb;
    --card-bg: #ffffff;
    --primary-text: #1f2937;
    --secondary-text: #6b7280;
    --border-color: #e5e7eb;
    
    /* --- Cores de Status (mantidas por semântica) --- */
    --success-color: #10b981; /* Verde para "Respondeu" */
    --warning-color: #f59e0b;  /* Amarelo para "Pendente" */
    --danger-color: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--main-bg);
    color: var(--primary-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- TELA DE LOGIN --- */
#login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #ffffff; /* Fundo branco */
}

.login-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    text-align: center;
    max-width: 500px; /* << NOVO: Aumentando a largura máxima do card */
    width: 90%; /* Garante que ele ocupe mais espaço em telas menores também */
    padding: 48px 40px; /* ajustado: menor espaço inferior para equilibrar o card */
    position: relative;
    z-index: 100; /* Aumentado para ficar acima dos emojis */
}

.logo-icon {
    font-size: 60px; /* << NOVO: Ícone um pouco maior */
    color: var(--accent-color);
    margin-bottom: 25px; /* << NOVO: Mais espaço abaixo do ícone */
}

.login-box h2 { 
    font-size: 28px; /* << NOVO: Título maior */
    margin-bottom: 10px; 
}
.login-box p { 
    color: var(--secondary-text); 
    margin-bottom: 30px; /* << NOVO: Mais espaço abaixo da descrição */
    font-size: 17px; /* << NOVO: Texto um pouco maior */
}

.login-box input {
    width: 100%;
    padding: 14px 18px; /* << NOVO: Padding maior para o input */
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 17px; /* << NOVO: Fonte maior */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

.btn {
    padding: 14px 25px; /* << NOVO: Padding maior para o botão */
    border: none;
    border-radius: 8px;
    font-size: 18px; /* << NOVO: Fonte maior para o botão */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.btn-primary { background-color: var(--accent-color); color: white; }
.btn-primary:hover { background-color: var(--accent-color-dark); transform: translateY(-1px); }
.error { color: var(--danger-color); margin-top: 10px; font-weight: 500; height: 20px; }

/* Specific styling for the small inline login error message
   Keep the generic .error boxed style for other contexts but
   make the login `#error-message` unobtrusive and hidden when empty. */
#error-message {
    display: block;
    color: var(--danger-color);
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 12px;
    font-weight: 500;
    height: auto;
    min-height: 0;
}
#error-message:empty {
    display: none;
}

/* Spinner pequeno usado dentro de botões */
.btn .btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    animation: spin 1s linear infinite;
}
.btn-primary .btn-spinner { border: 2px solid rgba(0,0,0,0.12); border-top-color: #fff; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- LAYOUT DO DASHBOARD --- */
.hidden { display: none !important; }

#dashboard-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}
.sidebar-header .logo-icon { font-size: 28px; margin: 0; }
.sidebar-header h2 { font-size: 22px; color: white; }

.sidebar-nav { display: flex; flex-direction: column; gap: 8px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--sidebar-text);
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}
.nav-link i { width: 20px; text-align: center; }
.nav-link:hover { background-color: rgba(255,255,255,0.1); color: var(--sidebar-text-hover); }
.nav-link.active { background-color: var(--accent-color); color: white; }

/* Conteúdo Principal */
.main-content {
    flex: 1;
    background-color: var(--main-bg);
    padding: 32px;
    overflow-y: auto;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.main-header h1 { font-size: 28px; }

.franchise-info { color: var(--secondary-text); }
.franchise-info strong { color: var(--primary-text); }

/* --- COMPONENTES DO DASHBOARD --- */
.view:not(.active) { display: none; }

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 18px;
    font-weight: 600;
}
.card-header i { color: var(--accent-color); }

.card-body { padding: 24px; }

/* Progress Bar */
.progress-bar-container { 
    width: 100%; 
    background-color: #e5e7eb; 
    border-radius: 8px; 
    overflow: hidden; 
    position: relative;
    height: 24px;
}
.progress-bar {
    height: 24px;
    background-color: var(--success-color); 
    border-radius: 8px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Porcentagem sempre centralizada */
.progress-bar-container::after {
    content: attr(data-percentage);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 900;
    color: #ea5a0c;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 -1px 2px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    letter-spacing: 0.3px;
    z-index: 2;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-label { display: block; text-align: right; margin-top: 8px; color: var(--secondary-text); font-weight: 500; }

/* Informação de última atualização */
.last-update-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.9em;
    color: var(--secondary-text);
}

.last-update-info i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Container de avisos de atualização */
.update-notice-container {
    margin-top: 16px;
}

/* Aviso de atualização automática (estado padrão) */
.auto-update-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: rgba(76, 175, 80, 0.08);
    border-radius: 8px;
    border-left: 3px solid #4caf50;
    font-size: 0.9em;
    color: #2e7d32;
}

.auto-update-notice i {
    margin-right: 10px;
    color: #4caf50;
    font-size: 1em;
}

/* Aviso de novos dados disponíveis */
.new-data-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
    border-radius: 8px;
    border-left: 3px solid #ff9800;
    gap: 16px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 12px 4px rgba(255, 152, 0, 0.2);
    }
}

.new-data-notice .notice-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e65100;
    font-weight: 600;
    font-size: 0.9em;
}

.new-data-notice .notice-content i {
    color: #ff9800;
    font-size: 1.1em;
    animation: ring-bell 1s ease-in-out infinite;
}

@keyframes ring-bell {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-15deg); }
    20%, 40% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
}

/* Botão de atualizar dados */
.btn-update-data {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    white-space: nowrap;
}

.btn-update-data:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    background: linear-gradient(135deg, #fb8c00 0%, #ef6c00 100%);
}

.btn-update-data:active {
    transform: translateY(0);
}

.btn-update-data i {
    font-size: 1em;
}

.btn-update-data.updating i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Listas */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.list-item:last-child { border-bottom: none; }
.list-item-name { font-weight: 500; }
.list-item-value { font-weight: 700; font-size: 1.1em; }
.consultant-progress { width: 40%; }

/* Detalhes por Fundo de Formatura */
.fundo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.status {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
.status-respondeu { background-color: #d1fae5; color: #065f46; }
.status-pendente { background-color: #fee2e2; color: #dc2626; }
.status-parcial { background-color: #fef3c7; color: #92400e; }

.copy-link-btn {
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    font-size: 18px;
    margin-left: 16px;
    transition: color 0.2s;
}
.copy-link-btn:hover { color: var(--accent-color); }

/* --- MAPA BRASIL --- */
.map-container {
    width: 100%;
.list-item > div {
     display: flex;
     align-items: center;
     gap: 10px;
}
.status { min-width: 80px; text-align: right; }
.copy-link-btn { display: inline-flex; align-items: center; justify-content: center; }
    max-height: 420px;
    background: #fbfbfc; /* leve contraste para destacar o mapa branco */
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.map-container svg {
    width: 100%;
    height: auto;
    max-height: 400px;
}
.map-container svg path,
.map-container svg g {
    /* garante que os caminhos do mapa fiquem visíveis sobre o fundo claro */
    /* Contorno mais escuro e levemente mais grosso para visibilidade forte */
    stroke: rgba(0,0,0,0.28) !important;
    stroke-width: 1.2px !important;
    fill: #ffffff !important; /* mantém o interior branco */
}
.map-dot {
    fill: var(--accent-color);
    stroke: rgba(0,0,0,0.08);
    stroke-width: 0.5;
    opacity: 0.95;
}

/* Novos estilos para pontos de franquias reais */
.franchise-dot {
    stroke: rgba(255,255,255,0.8);
    stroke-width: 1;
    opacity: 0.9;
    cursor: pointer;
    transition: opacity 0.2s ease, stroke-width 0.2s ease;
}

.franchise-dot:hover {
    stroke-width: 2;
    opacity: 1;
    /* Removido transform: scale que causava bugs */
}

/* Estilos para cards colapsáveis */
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

.card-header:hover {
    background-color: #f8f9fa;
}

.toggle-icon {
    margin-left: auto;
    color: var(--secondary-text);
    transition: transform 0.2s ease;
}

.card-body {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Pequenina animação ao aparecer */
.map-dot.show {
    transform-origin: center center;
    animation: pop 400ms ease-out;
}
@keyframes pop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 0.95; }
}

/* --- FAQ Styles --- */
.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    user-select: none; /* Prevent text selection when clicking */
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-text);
}

.faq-icon {
    color: var(--accent-color);
    transition: transform 0.2s ease;
    font-size: 16px;
}

.faq-answer {
    padding: 20px;
    background: white;
    animation: fadeIn 0.3s ease-in-out;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: var(--secondary-text);
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Copy Button Styling - Matches WhatsApp style */
.copy-link-btn {
    background: #007bff; /* Bootstrap blue */
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 0 2px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    position: relative;
    overflow: hidden;
}

.copy-link-btn:hover {
    background: #0056b3; /* Darker blue */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.copy-link-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 123, 255, 0.3);
}

.copy-link-btn.copied {
    background: #28a745;
    animation: copySuccess 0.6s ease;
}

@keyframes copySuccess {
    0% {
        transform: scale(1) translateY(-2px);
    }
    50% {
        transform: scale(1.1) translateY(-2px);
    }
    100% {
        transform: scale(1) translateY(-2px);
    }
}

/* Success state for copy button */
.copy-link-btn .fa-check {
    color: white;
}

/* WhatsApp Button Styling */
.whatsapp-btn {
    background: #25D366; /* WhatsApp green */
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 0 2px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.whatsapp-btn:hover {
    background: #128C7E; /* Darker WhatsApp green */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(37, 211, 102, 0.3);
}

/* Action buttons container */
.student-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Permite quebra de linha se necessário */
}

/* Completed icon for responded students */
.completed-icon {
    color: #28a745;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    padding: 6px;
}

.completed-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Messages Button Styling */

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    height: auto;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Responsive modal for mobile */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    /* Aviso de novos dados responsivo */
    .new-data-notice {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .btn-update-data {
        width: 100%;
        justify-content: center;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-text);
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--secondary-text);
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: var(--primary-text);
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-text);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #e9ecef;
    color: var(--primary-text);
}

.tab-btn.active {
    background: white;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Modal Body */
.modal-body {
    flex: 1;
    overflow: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
    max-height: calc(90vh - 150px);
}

.tab-content {
    display: none;
    flex: 1;
    overflow: auto;
    height: auto;
    max-height: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
}

/* Info message */

.no-messages {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Message Cards */

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Força que não mostre texto adicional */

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    justify-content: flex-end;
    align-items: center;
}

@keyframes copySuccess {
    0% {
        transform: scale(1) translateY(-1px);
    }
    50% {
        transform: scale(1.1) translateY(-1px);
    }
    100% {
        transform: scale(1) translateY(-1px);
    }
}

/* Debug: Garantir que o conteúdo seja totalmente visível */

/* Garantir que o card não seja limitado */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Brilho Natural para Emojis --- */

/* Adiciona um brilho vermelho suave aos emojis detratores */
.floating-emoji.detrator {
    text-shadow: 0 0 8px rgba(255, 82, 82, 0.7), 
                 0 0 12px rgba(255, 82, 82, 0.5);
}

/* Adiciona um brilho amarelo suave aos emojis neutros */
.floating-emoji.neutro {
    text-shadow: 0 0 8px rgba(255, 214, 10, 0.7),
                 0 0 12px rgba(255, 214, 10, 0.5);
}

/* Garante que o emoji feliz (promotor) não tenha brilho colorido */
.floating-emoji.promotor {
    text-shadow: none;
}

/* --- ESTILOS PARA NPS FRANQUEADORA --- */
.nps-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.nps-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nps-table th {
    background: var(--accent-color);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.nps-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.nps-row:hover {
    background-color: #f9fafb;
}

.franquia-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-position {
    background: var(--accent-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.nps-score {
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    padding: 8px 16px;
    border-radius: 4px;
}

.nps-excelente { background: #10b981; color: white; }
.nps-bom { background: #59a14f; color: white; }
.nps-medio { background: #f59e0b; color: white; }
.nps-ruim { background: #ef4444; color: white; }

.promotores { color: #10b981; font-weight: 600; }
.neutros { color: #f59e0b; font-weight: 600; }
.detratores { color: #ef4444; font-weight: 600; }

.btn-detalhes {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-detalhes:hover {
    background: var(--accent-color-dark);
    transform: translateY(-1px);
}

/* --- MODAL NPS --- */
.modal-large {
    max-width: 900px;
    width: 90vw;
}

.nps-summary {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.nps-metric {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nps-metric .value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.nps-metric .label {
    font-size: 14px;
    color: #6b7280;
}

.category-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.category-tabs .tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.category-tabs .tab-btn.active {
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

.category-tabs .tab-btn:hover {
    background: #f3f4f6;
}

.tab-count {
    background: #e5e7eb;
    color: #374151;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
}

.category-tabs .tab-btn.active .tab-count {
    background: var(--accent-color);
    color: white;
}

.category-list {
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.category-list.active {
    display: block;
}

.response-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
    background: white;
}

.response-info {
    flex: 1;
}

.response-name {
    font-weight: 600;
    color: #111827;
}

.response-details {
    font-size: 14px;
    color: #6b7280;
    margin-top: 2px;
}

.response-score {
    font-size: 20px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
}

.score-promotor { background: #dcfce7; color: #166534; }
.score-neutro { background: #fef3c7; color: #92400e; }
.score-detrator { background: #fee2e2; color: #991b1b; }

/* --- Links View Styles --- */
.links-container {
    margin-bottom: 32px;
}

.links-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.links-section-title i {
    color: var(--accent-color);
}

.links-cards {
    /* Stack franchise cards vertically, one per row */
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.link-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.link-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.link-card-header {
    background: #f8f9fa;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.link-card-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-text);
}

.link-card-header .toggle-icon {
    color: var(--secondary-text);
    transition: transform 0.3s ease;
}

.link-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

.link-card-content {
    padding: 16px;
    display: none;
}

.link-card.expanded .link-card-content {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.link-name {
    font-size: 14px;
    color: var(--primary-text);
}

.link-actions {
    display: flex;
    gap: 8px;
}

/* Fundo section specifics */
.fundo-section { padding: 8px 0 0 0; border-top: 1px dashed var(--border-color); margin-top: 8px; }
.fundo-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.fundo-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--primary-text); }
.fundo-students { padding-top: 8px; }
.student-item { padding: 6px 0; }

.toggle-fundo-btn { background: transparent; border: none; cursor: pointer; color: var(--secondary-text); }
.toggle-fundo-btn i { transition: transform 0.25s ease; }
.toggle-fundo-btn[aria-expanded="true"] i { transform: rotate(180deg); color: var(--accent-color); }

/* Mensagens de erro */
.error {
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid #fecaca;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin: 8px 0;
}

/* Loading placeholder para lazy loading */
.loading-placeholder {
    padding: 16px;
    text-align: center;
    color: var(--secondary-text);
    font-size: 14px;
}

.loading-placeholder .fa-spinner {
    margin-right: 8px;
    color: var(--accent-color);
}

.no-fundos {
    padding: 16px;
    text-align: center;
    color: var(--secondary-text);
    font-size: 14px;
}
/* =================================================================
   ESTILOS PARA TELA DE EVOLU��O DO NPS (Minha Franquia)
   ================================================================= */

.nps-evolution-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header da se��o */
.nps-header {
    text-align: center;
    margin-bottom: 40px;
}

.nps-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 700;
}

.nps-header h2 i {
    color: #4CAF50;
    margin-right: 12px;
}

.nps-header p {
    font-size: 16px;
    color: #7f8c8d;
}

/* Grid de cards */
.nps-cards-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

/* Card individual de NPS */
.nps-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.nps-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.nps-card-destaque {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
    color: white;
    transform: scale(1.05);
}

.nps-card-destaque:hover {
    transform: scale(1.08) translateY(-5px);
}

.nps-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #7f8c8d;
}

.nps-card-destaque .nps-card-header {
    color: rgba(255, 255, 255, 0.95);
}

.nps-card-header i {
    font-size: 20px;
}

.nps-card-value {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #2c3e50;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.nps-card-destaque .nps-card-value {
    color: white;
}

.nps-card-label {
    font-size: 14px;
    color: #95a5a6;
    font-weight: 500;
}

.nps-card-destaque .nps-card-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Seta de evolu��o */
.nps-arrow {
    font-size: 48px;
    color: #4CAF50;
    animation: pulse 2s ease-in-out infinite;
}

.nps-arrow i {
    filter: drop-shadow(0 4px 6px rgba(76, 175, 80, 0.3));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Indicador de mudan�a */
.nps-change-indicator {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    border-left: 6px solid;
}

.nps-change-indicator.positive {
    border-left-color: #4CAF50;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.nps-change-indicator.negative {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.nps-change-indicator.neutral {
    border-left-color: #FF9800;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.change-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.positive .change-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.negative .change-icon {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(244, 67, 54, 0.4);
}

.neutral .change-icon {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.change-content {
    flex: 1;
}

.change-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.positive .change-value {
    color: #2e7d32;
}

.negative .change-value {
    color: #c62828;
}

.neutral .change-value {
    color: #E65100;
}

.change-message {
    font-size: 18px;
    font-weight: 600;
}

.positive .change-message {
    color: #4CAF50;
}

.negative .change-message {
    color: #f44336;
}

.neutral .change-message {
    color: #FF9800;
}

/* Box de informa��o */
.nps-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border: 2px solid #90caf9;
}

.nps-info-box i {
    font-size: 28px;
    color: #1976d2;
    flex-shrink: 0;
    margin-top: 2px;
}

.nps-info-box strong {
    display: block;
    font-size: 18px;
    color: #1565c0;
    margin-bottom: 8px;
}

.nps-info-box p {
    font-size: 15px;
    color: #0d47a1;
    line-height: 1.6;
    margin: 0;
}

/* =================================================================
   ESTILOS PARA ANÁLISES COMPARATIVAS (2025-1 vs 2025-2)
   ================================================================= */

.analises-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.analises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.analise-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.analise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-color: #4CAF50;
}

.analise-card-header {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.analise-periodos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.analise-periodo {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.analise-periodo:hover {
    background: #e9ecef;
}

.periodo-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.periodo-valor {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #2c3e50;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.analise-seta {
    font-size: 24px;
    color: #95a5a6;
    font-weight: 700;
    flex-shrink: 0;
}

.analise-indicador {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
}

.indicador-icon {
    font-size: 20px;
    font-weight: 900;
}

.indicador-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.5px;
}

/* Responsividade */
@media (max-width: 768px) {
    .nps-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nps-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .nps-card-destaque {
        transform: scale(1);
    }
    
    .nps-card-value {
        font-size: 42px;
    }
    
    .change-value {
        font-size: 22px;
    }
    
    .change-icon {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }
    
    .analises-grid {
        grid-template-columns: 1fr;
    }
    
    .analise-periodos {
        flex-direction: column;
        gap: 12px;
    }
    
    .analise-seta {
        transform: rotate(90deg);
    }
    
    .periodo-valor {
        font-size: 24px;
    }
}
