/* RESET GERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #1e293b;
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    background-color: #0F4D3A; /* Verde Marca */
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    position: sticky; /* Cola no topo */
    top: 0;
    z-index: 1000;
}

.logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Deixa branco */
    display: block;
}

/* Links */
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
}

/* Perfil */
.nav-right { display: flex; align-items: center; gap: 20px; }

.user-profile {
    display: flex; align-items: center; gap: 12px; text-align: right;
    border-right: 1px solid rgba(255,255,255,0.2);
    padding-right: 20px;
}

.user-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

.user-name { color: white; font-size: 0.85rem; font-weight: 600; display: block; }
.user-email { color: #94a3b8; font-size: 0.75rem; display: block; }

.btn-logout {
    background: transparent; border: 1px solid rgba(255,255,255,0.3);
    color: white; padding: 6px 14px; border-radius: 4px;
    cursor: pointer; font-size: 0.8rem; transition: 0.2s;
}

.btn-logout:hover { background: rgba(255,255,255,0.1); }

/* --- DASHBOARD CONTAINER --- */
.dashboard-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 40px;
}

/* BANNER */
.dashboard-banner {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.dashboard-banner img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}

/* TÍTULOS */
.section-title {
    font-size: 1.25rem; color: #334155;
    margin-bottom: 20px; font-weight: 600;
}

/* GRID DE CARDS */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white; border-radius: 8px;
    padding: 24px; border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.kpi-card { display: flex; align-items: center; gap: 20px; }

.kpi-icon {
    width: 48px; height: 48px;
    background-color: #f1f5f9; color: #0F4D3A;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

.kpi-card h3 { font-size: 0.85rem; color: #64748b; font-weight: 500; margin-bottom: 4px; }
.kpi-value { font-size: 1.5rem; color: #0f172a; font-weight: 700; }

/* Alerta */
.kpi-card.alert .kpi-icon { background-color: #fef2f2; color: #dc2626; }
.kpi-card.alert .kpi-value { color: #dc2626; }

/* GRÁFICOS */
.charts-grid {
    display: grid; grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.chart-container {
    min-height: 400px;
    display: flex; flex-direction: column;
}

.card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.card-header h3 { font-size: 1rem; font-weight: 600; color: #334155; }

.btn-small {
    background: white; border: 1px solid #cbd5e1;
    color: #475569; padding: 6px 12px; border-radius: 6px;
    font-size: 0.75rem; cursor: pointer;
}

/* Responsividade */
@media (max-width: 900px) {
    .navbar { padding: 0 20px; }
    .nav-links, .user-info { display: none; } /* Simplifica no mobile */
    .user-profile { border: none; padding-right: 0; }
    
    .charts-grid { grid-template-columns: 1fr; }
    .dashboard-container { padding: 20px; }
    .dashboard-banner { height: 140px; }
}
/* Botão de Perfil (Destaque) */
.btn-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    
    /* Estilo Diferenciado (Cápsula Translúcida) */
    background-color: rgba(255, 255, 255, 0.15); 
    color: white;
    text-decoration: none;
    
    padding: 8px 16px;
    border-radius: 20px; /* Bordas bem redondas */
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent; /* Para evitar pulo no hover */
}

/* Efeito Hover: Fica branco com texto verde */
.btn-profile:hover {
    background-color: #ffffff;
    color: #0F4D3A; /* Verde da marca */
    transform: translateY(-1px); /* Leve subida */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Ajuste no botão de Sair para ficar harmônico ao lado */
.btn-logout {
    /* Se quiser, pode deixar o botão sair apenas como ícone para economizar espaço */
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}

.btn-logout:hover {
    border-color: #fca5a5; /* Vermelho claro ao passar o mouse */
    color: #fca5a5;
    background: rgba(255, 0, 0, 0.05);
}

/* Responsividade: No mobile, esconde o texto 'Minha Conta' e deixa só o ícone */
@media (max-width: 900px) {
    .btn-profile {
        font-size: 0; /* Esconde o texto */
        padding: 10px; /* Ajusta padding para ficar quadrado/redondo */
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
    }
    
    .btn-profile i {
        font-size: 1.2rem; /* Aumenta o ícone */
    }
}
/* --- Contêineres Laterais de Anúncios --- */
.ads-sidebar {
    position: fixed;
    top: 90px; /* Altura da Navbar + um pequeno respiro */
    width: 260px; /* Largura do Skyscraper */
    height: calc(100vh - 110px); /* 100% da altura da tela MENOS o topo e margem inferior */
    z-index: 90;
}

.ads-left {
    left: 20px;
}

.ads-right {
    right: 20px;
}

/* --- Estilo do Placeholder (Full Height) --- */
.ad-placeholder-full {
    width: 100%;
    height: 100%; /* Preenche toda a altura do container pai */
    background-color: #f1f5f9;
    border: 2px dashed #94a3b8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.ad-placeholder-full:hover {
    background-color: #e2e8f0;
    border-color: #64748b;
    cursor: pointer;
}

/* --- Responsividade: Esconder se a tela for menor que 1600px --- */
@media (max-width: 1600px) {
    .ads-sidebar {
        display: none;
    }
}
/* Container dos gráficos */
.chart-container {
    position: relative;
    height: 350px; /* Define uma altura fixa para o gráfico */
    width: 100%;
    margin-bottom: 20px;
}

/* Garante que o canvas respeite o container */
canvas {
    max-height: 100% !important;
    width: 100% !important;
}

/* Ajuste das sidebars para não quebrarem o layout */
.ads-sidebar {
    position: fixed;
    top: 80px;
    width: 160px;
    height: calc(100vh - 80px);
    z-index: 10;
}
/* 1. Aumentando a largura das Sidebars */
.ads-sidebar {
    position: fixed;
    top: 80px; /* Ajuste conforme a altura da sua navbar */
    width: 290px; /* Largura aumentada (era geralmente 160px) */
    height: calc(100vh - 80px);
    z-index: 10;
    background-color: #f8fafc; /* Opcional: cor de fundo */
    padding: 10px;
}

/* 2. Posicionamento específico */
.ads-left {
    left: 0;
}

.ads-right {
    right: 0;
}

/* 3. Ajustando o conteúdo central para não ser coberto pelas sidebars */
.dashboard-container {
    margin-left: 280px;  /* Largura da sidebar (220px) + 20px de respiro */
    margin-right: 280px; /* Largura da sidebar (220px) + 20px de respiro */
    padding: 20px;
    transition: all 0.3s ease;
}

/* 4. Garantindo que as imagens dos anúncios ocupem toda a nova largura */
.ad-placeholder-full img {
    width: 180%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}
/* Remove bordas e sombras que podem parecer bordas */
.ads-sidebar, 
.ad-placeholder-full {
    border: none !important; /* Remove a linha da borda */
    box-shadow: none !important; /* Remove sombras que dão aspecto de profundidade/borda */
    background: transparent !important; /* Garante que o fundo não crie um contraste de borda */
}

/* Garante que o link e a imagem também não tenham bordas residuais */
.ad-placeholder-full a, 
.ad-placeholder-full img {
    border: none !important;
    outline: none !important; /* Remove aquela linha azul ao clicar */
}
/* Botão Flutuante FAQ */
.btn-faq-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #2563eb; /* Azul padrão Getconstru */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    z-index: 9999; /* Garante que fique acima de tudo */
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efeito ao passar o mouse */
.btn-faq-floating:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #1d4ed8;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
}

/* Tooltip (Legenda que aparece ao lado) */
.tooltip-faq {
    position: absolute;
    right: 75px;
    background-color: #1e293b;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.btn-faq-floating:hover .tooltip-faq {
    opacity: 1;
}

/* Animação opcional de atenção (atenção visual) */
@keyframes pulse-faq {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.btn-faq-floating {
    animation: pulse-faq 2s infinite;
}
/* --- RESPONSIVIDADE DO DASHBOARD --- */

@media (max-width: 1024px) {
    /* 1. Remove margens laterais que empurram o conteúdo (essencial para as sidebars de anúncios não esmagarem o centro) */
    .dashboard-container {
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 20px;
        max-width: 100%;
    }

    /* 2. Transforma o grid de gráficos em uma única coluna */
    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* 3. Ajusta os cards de KPI para caberem em telas menores */
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    /* 4. O GRANDE TRUQUE PARA OS GRÁFICOS: Trava a altura no mobile */
    .chart-container {
        height: 300px !important; /* Altura fixa para o gráfico não crescer infinitamente */
        min-height: 300px !important;
    }

    /* Força o canvas a obedecer o container */
    canvas {
        width: 100% !important;
        height: 100% !important;
    }

    .dashboard-banner {
        height: 120px;
    }

    .section-title {
        font-size: 1.1rem;
    }
}

/* 5. Esconde anúncios em telas menores para não sobrepor o dashboard */
@media (max-width: 1400px) {
    .ads-sidebar {
        display: none !important;
    }
}
/* --- NAVBAR BASE --- */
.navbar {
    background-color: #0F4D3A;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

#menu-check { display: none; } /* Esconde o checkbox real */

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: white; }

/* --- RESPONSIVIDADE (MOBILE < 900px) --- */
@media (max-width: 900px) {
    .navbar { padding: 0 20px; }

    /* Ícone Hamburguer */
    .menu-hamburguer {
        display: block;
        color: white;
        font-size: 1.8rem;
        cursor: pointer;
        order: -1; /* Mantém na esquerda antes do logo */
    }

    /* Transformando a lista de links em Menu Lateral (Drawer) */
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%; /* Escondido */
        width: 280px;
        height: calc(100vh - 70px);
        background-color: #0F4D3A;
        flex-direction: column;
        gap: 0;
        transition: all 0.4s ease;
        padding-top: 20px;
        box-shadow: 10px 0 20px rgba(0,0,0,0.2);
    }

    .nav-links li { width: 100%; }

    .nav-links a {
        padding: 18px 30px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    /* Ação de Abrir o Menu */
    #menu-check:checked ~ .nav-center .nav-links {
        left: 0;
    }

    /* Ajuste da logo e perfil */
    .logo { height: 38px; }
    
    .user-info { display: none; } /* Esconde nome/email no mobile */

    .btn-profile span { display: none; } /* Mantém apenas o ícone de engrenagem */
    
    .btn-profile {
        padding: 10px;
        border-radius: 50%;
        background: rgba(255,255,255,0.1);
    }
}
/* ============================================================
   NAVBAR & MENU RESPONSIVO (COMPLETO)
   ============================================================ */

/* --- Estilos Base (Desktop) --- */
.navbar {
    background-color: #0F4D3A; /* Verde Marca */
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Esconde o controle do menu e o ícone no Desktop */
#menu-check, .menu-hamburguer {
    display: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
}

/* --- Responsividade (Mobile: abaixo de 900px) --- */
@media (max-width: 900px) {
    .navbar {
        padding: 0 20px;
        justify-content: space-between;
    }

    /* Exibe o ícone de hambúrguer */
    .menu-hamburguer {
        display: block;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        order: -1; /* Posiciona à esquerda do logo */
    }

    /* Menu Lateral (Drawer) */
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%; /* Escondido à esquerda */
        width: 280px;
        height: calc(100vh - 70px);
        background-color: #0F4D3A;
        flex-direction: column;
        gap: 5px; /* Espaçamento entre os blocos de link */
        padding-top: 30px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: 10px 0 25px rgba(0,0,0,0.3);
    }

    /* Itens do Menu Mobile */
    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        padding: 22px 35px; /* Espaço generoso para o clique */
        font-size: 1.1rem;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.03);
        color: #cbd5e1;
    }

    /* Estado Ativo e Hover no Mobile */
    .nav-links a.active {
        background-color: rgba(255, 255, 255, 0.08);
        color: white;
        border-left: 6px solid #ffffff;
        padding-left: 29px; /* Ajuste para compensar a borda lateral */
    }

    .nav-links a:active {
        background-color: rgba(255, 255, 255, 0.15);
    }

    /* LOGICA DE ABERTURA: Quando o checkbox é marcado */
    #menu-check:checked ~ .nav-center .nav-links {
        left: 0; /* Desliza para dentro da tela */
    }

    /* Ajustes de interface mobile */
    .logo { height: 38px; }
    
    .nav-right {
        gap: 15px;
    }

    .btn-profile span, .user-info {
        display: none !important; /* Esconde textos para não quebrar a barra */
    }

    .btn-profile {
        padding: 10px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
    }
}