:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --accent: #38bdf8;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --border: #334155;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, sans-serif; }

body { background-color: var(--bg-dark); color: var(--text-main); line-height: 1.6; }

header { padding: 2rem; text-align: center; border-bottom: 1px solid var(--border); background: #111827; }
header .logo { font-size: 1.8rem; font-weight: bold; color: var(--accent); margin-bottom: 5px; }

main { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Filtros */
.filtros-container { 
    display: flex; gap: 20px; margin-bottom: 30px; 
    background: var(--card-bg); padding: 20px; border-radius: 12px;
}
.filtro-box { flex: 1; display: flex; flex-direction: column; gap: 8px; }
select { 
    padding: 10px; border-radius: 6px; border: 1px solid var(--border); 
    background: var(--bg-dark); color: white; cursor: pointer;
}

/* Grid de Cards */
.cards-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; 
}
.card { background: var(--card-bg); padding: 20px; border-radius: 12px; border: 1px solid var(--border); }
.card h3 { font-size: 1rem; color: var(--accent); margin-bottom: 15px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.destaque { font-size: 1.2rem; font-weight: bold; margin-bottom: 5px; }
.sub-info { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 5px; }

/* Gráficos */
.charts-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.chart-box { background: var(--card-bg); padding: 15px; border-radius: 12px; height: 350px; }

/* Tabela Responsiva */
.table-section { background: var(--card-bg); padding: 20px; border-radius: 12px; margin-bottom: 30px; }
.table-container { overflow-x: auto; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }

/* Botão CSV */
.footer-action { text-align: center; margin-bottom: 50px; }
.btn-csv { 
    background: var(--accent); color: #000; padding: 15px 30px; border: none; 
    border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s;
}
.btn-csv:hover { opacity: 0.8; transform: translateY(-2px); }

/* --- RESPONSIVIDADE (Mobile) --- */
@media (max-width: 768px) {
    .filtros-container { flex-direction: column; }
    .cards-grid { grid-template-columns: 1fr; }
    .charts-container { grid-template-columns: 1fr; }
    .chart-box { height: 300px; }
    
    header { padding: 1rem; }
    header .logo { font-size: 1.4rem; }
}

/* Estilização de itens de lista dentro dos cards */
.card-item { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.95rem; }
.placeholder { color: var(--text-dim); font-style: italic; }