/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    --bg-body: #0B0E11;       /* Fundo super escuro (quase preto) */
    --bg-card: #151A21;       /* Fundo dos cartões */
    --bg-hover: #1E232D;      /* Hover nos cartões */
    --primary: #CCFF00;       /* Verde Neon (Tech/Dinheiro) */
    --text-main: #FFFFFF;
    --text-muted: #8B909A;
    --border-color: rgba(255, 255, 255, 0.05);
    --glass-effect: rgba(21, 26, 33, 0.8);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --radius: 16px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    padding: 20px;
    height: 100vh;
    overflow-x: hidden;
}

/* === Layout Grid Principal === */
#dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* === 1. Topo (Meta) === */
#goal-bar {
    background: linear-gradient(90deg, var(--bg-card) 0%, rgba(20,20,20,0) 100%);
    border: 1px solid var(--border-color);
    padding: 20px 30px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow);
}

.goal-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.goal-text span {
    color: var(--primary);
    font-weight: 700;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

#progress-bar-fill {
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary); /* Efeito Neon Glow */
    width: 0%; /* Será controlado pelo JS */
    transition: width 1s ease-in-out;
}

/* === Main Grid Layout === */
#main-content {
    display: grid;
    grid-template-columns: 3fr 1fr; /* 3 partes gráficos, 1 parte lista */
    grid-template-rows: auto auto;
    gap: 24px;
}

/* === 2. KPIs === */
#kpis-section {
    grid-column: 1 / -1; /* Ocupa toda a largura */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, background 0.2s;
}

.kpi-card:hover {
    transform: translateY(-5px);
    background: var(--bg-hover);
    border-color: rgba(204, 255, 0, 0.2);
}

.kpi-title {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* === 3. Gráficos === */
#charts-section {
    grid-column: 1 / 2;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Filtros de tempo */
#time-filters {
    display: flex;
    gap: 10px;
    background: var(--bg-card);
    padding: 8px;
    border-radius: 12px;
    width: fit-content;
    border: 1px solid var(--border-color);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover {
    color: var(--text-main);
}

.filter-btn.active {
    background: rgba(204, 255, 0, 0.1);
    color: var(--primary);
}

/* Container dos Gráficos */
.chart-row {
    display: flex;
    gap: 24px;
    width: 100%;
}


.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    width: 100%;
    
    /* ADICIONE ESSA LINHA PARA PARAR DE ESTICAR: */
    height: 400px; 
    
    position: relative;
    /* Efeito de brilho sutil no topo */
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.03), transparent 100px);
}
.chart-container h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--text-main);
}

.chart-container.half {
    width: 50%;
}

/* === 4. Listas (Feed Lateral) === */
#lists-section {
    grid-column: 2 / 3;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    height: fit-content;
    max-height: 800px; /* Limita altura */
    overflow-y: auto;
}

#lists-section h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

#feed-recente-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#feed-recente-list li {
    background: rgba(255,255,255, 0.03);
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 3px solid var(--primary);
    transition: background 0.2s;
}

#feed-recente-list li:hover {
    background: rgba(255,255,255, 0.06);
    color: var(--text-main);
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

/* Responsividade */
@media (max-width: 1024px) {
    #main-content {
        grid-template-columns: 1fr; /* Vira coluna única */
    }
    .chart-row {
        flex-direction: column;
    }
    .chart-container.half {
        width: 100%;
    }
}