/* --- 1. CONFIGURAÇÕES GERAIS --- */
html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f172a;
    color: #f8fafc;
    text-align: center;
}

/* --- 2. LAYOUT E CARDS --- */
.simulador { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; }
.card {
    background: white; padding: 40px; border-radius: 24px; width: 100%; max-width: 800px;
    color: #1e293b; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); margin-bottom: 20px;
}
.grid-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; }
input, select { width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 16px; }

/* --- 3. TABELAS E GRÁFICOS --- */
.chart-container { position: relative; height: 400px; width: 100%; margin: 30px 0; }
.tabela-estilizada, #tabela-dados { width: 100%; margin: 20px auto; border-collapse: collapse; background: white; }
.tabela-estilizada th, .tabela-estilizada td, #tabela-dados th, #tabela-dados td {
    border: 1px solid #e2e8f0; padding: 12px; text-align: left; color: #1e293b;
}
.tabela-estilizada th, #tabela-dados th { background-color: #f8fafc; color: #64748b; font-weight: 600; text-align: center; }

/* --- 4. BOTÕES --- */
button { background: #00b386; color: white; border: none; padding: 18px; border-radius: 12px; font-size: 18px; font-weight: bold; cursor: pointer; width: 100%; transition: 0.3s; }
.btn-pdf { background: #1e293b !important; margin-top: 15px; font-size: 14px !important; padding: 12px !important; }

/* --- 5. NAVEGAÇÃO PRINCIPAL --- */
.tab-navigation { display: flex; justify-content: center; background: #1e293b; padding: 10px; position: sticky; top: 0; z-index: 1000; gap: 15px; border-bottom: 2px solid #00b386; flex-wrap: wrap; }
.tab-link { background: transparent; color: #94a3b8; padding: 12px 25px; border: none; cursor: pointer; font-weight: bold; border-radius: 8px; width: auto; }
.tab-link.active { background: #00b386; color: white; }
.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }

/* --- 6. ÁREA DE EDUCAÇÃO --- */
.container-extra { max-width: 1000px; margin: 40px auto; padding: 0 20px; }
.menu-educacao { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.btn-tema { background: #334155; padding: 12px 20px; width: auto; font-size: 16px; }
.btn-tema.active { background: #00b386; }
.artigo-completo { text-align: left; background: white; padding: 40px; border-radius: 20px; color: #1e293b; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.pagina-artigo { display: none; }
.pagina-artigo.active { display: block; }

/* --- 7. DASHBOARD E PATRIMÔNIO (AQUI ESTÁ A CORREÇÃO) --- */
.patrimonio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}
.patrimonio-total-container {
    background: #1e293b;
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border-left: 5px solid #00b386;
}
.patrimonio-total-container.ganho-card { border-left: 5px solid #3b82f6; }
.patrimonio-total-container span { font-size: 0.85rem; opacity: 0.8; text-transform: uppercase; display: flex; align-items: center; justify-content: center; }
.patrimonio-total-container h2 { font-size: 2.2rem; margin: 5px 0; color: #00b386; }
.patrimonio-total-container.ganho-card h2 { color: #3b82f6; }

.info-icon {
    cursor: help; background: #64748b; color: white; border-radius: 50%;
    width: 16px; height: 16px; font-size: 0.7rem; margin-left: 8px;
    display: inline-flex; align-items: center; justify-content: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}
.stat-card { background: #f1f5f9; padding: 10px; border-radius: 8px; text-align: center; font-size: 0.9rem; color: #334155; }
.stat-card strong { display: block; font-size: 1.1rem; color: #00b386; margin-top: 5px; }

/* --- 8. HERO --- */
.hero { padding: 60px 20px; background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1590283603385-17ffb3a7f29f?auto=format&fit=crop&q=80&w=2070') no-repeat center/cover; border-radius: 0 0 50px 50px; margin-bottom: 40px; }
.hero-button { display: inline-block; background: #00b386; color: white; text-decoration: none; padding: 18px 32px; border-radius: 12px; font-size: 18px; font-weight: bold; animation: flutuar 3s ease-in-out infinite; }

@keyframes flutuar { 0% { transform: translateY(0); } 50% { transform: translateY(-7px); } 100% { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .card { padding: 20px; width: 95%; }
    .grid-inputs, .patrimonio-grid { grid-template-columns: 1fr; }
}

.pagina-artigo {
    display: none; /* Esconde todos por padrão */
}
.pagina-artigo.active {
    display: block; /* Mostra apenas o ativo */
}
.sub-artigo-content {
    margin-top: 20px;
}