:root {
    --bg-page: #0f1013;
    --sidebar-bg: #15161A;
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.06);
    --text-primary: #ededf0;
    --text-secondary: #8E92A2;
    --accent-red: #FA3E3E;
    --accent-gold: #FABC3E;
    --accent-green: #3EFA88;
}

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

body { background: var(--bg-page); color: var(--text-primary); font-family: 'Inter', sans-serif; display: flex; height: 100vh; overflow: hidden; }

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }

/* LAYOUT PRINCIPAL */
.app-layout { display: flex; width: 100%; }

/* ASIDE MENU */
.sidebar {
    width: 260px; background: var(--sidebar-bg); border-right: 1px solid var(--card-border);
    padding: 2.5rem 1.5rem; display: flex; flex-direction: column; justify-content: space-between;
}
.brand h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -1px; }
.sub-brand { font-size: 0.8rem; color: var(--accent-red); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; }

.nav-menu { flex-grow: 1; display: flex; flex-direction: column; gap: 0.5rem; margin-top: 4rem; }
.nav-item {
    background: transparent; border: none; padding: 1rem; color: var(--text-secondary);
    text-align: left; font-size: 0.95rem; font-family: 'Inter', sans-serif; border-radius: 8px;
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 10px;
}
.nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.nav-item.active { background: rgba(250, 62, 62, 0.08); color: var(--text-primary); border-left: 3px solid var(--accent-red); }
.icon { font-size: 1.2rem; }
.sidebar-footer { font-size: 0.75rem; color: #555; }

/* ÁREA DE CONTEÚDO */
.content { flex: 1; padding: 3rem 4rem; overflow-y: auto; position: relative; }
.tab-pane { display: none; animation: slideIn 0.3s ease-out; }
.tab-pane.active { display: block; }

.section-header { margin-bottom: 2.5rem; }
.section-header h2 { font-size: 2rem; line-height: 1.2;}
.section-header p { color: var(--text-secondary); margin-top: 0.5rem; }

/* GRIDS NUMÉRICOS (TABELA) */
.glass-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 2rem; overflow-x: auto;}

.minimal-table { width: 100%; border-collapse: collapse; text-align: left; }
.minimal-table th { font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding-bottom: 1.5rem; border-bottom: 1px solid var(--card-border); white-space: nowrap;}
.minimal-table td { padding: 1.2rem 0; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,0.02); white-space: nowrap; }
.minimal-table th, .minimal-table td { padding-right: 2rem; }
.minimal-table td:first-child { font-weight: 500; color: #fff; white-space: normal; min-width: 200px; }

.highlight-col { color: var(--accent-gold) !important; }
.highlight-val { font-family: 'Space Grotesk', sans-serif; color: var(--accent-gold); font-size: 1.3rem; font-weight: 700; }

/* LINHA DO TEMPO (HISTÓRIA) */
.timeline-container { padding: 4rem 2rem; overflow-x: auto; }
.timeline { display: flex; align-items: flex-start; position: relative; width: max-content; gap: 6rem; padding-top: 2rem;}

.timeline-line { position: absolute; top: 44px; left: 20px; right: 0; height: 2px; background: var(--card-border); z-index: 1; }

.timeline-node { position: relative; z-index: 2; width: 220px; display: flex; flex-direction: column; align-items: flex-start; }
.node-year { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 0.5rem; }
.node-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--text-secondary); border: 4px solid var(--bg-page); margin-bottom: 1.5rem; margin-left: 2px; transition: 0.3s; }
.node-content h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: #fff; }
.node-content p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* Destaque 2025 Timeline */
.timeline-node:hover .node-dot { background: var(--accent-red); transform: scale(1.3); }
.highlight-year { color: var(--accent-red); }
.highlight-dot { background: var(--accent-red); box-shadow: 0 0 15px rgba(250, 62, 62, 0.4); border-color: rgba(250,62,62,0.2); }
.highlight-text { color: var(--accent-gold) !important; }

/* SIMULADOR */
.simulator-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem;}
.input-block { background: rgba(0,0,0,0.3); border: 1px solid var(--card-border); padding: 1.5rem; border-radius: 12px; width: 100%; max-width: 400px; }
.input-block label { display: block; font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 0.8rem; letter-spacing: 1px;}
.input-wrapper { display: flex; align-items: center; border: 1px solid var(--card-border); border-radius: 6px; overflow: hidden; background: #000; }
.currency { padding: 12px 15px; background: rgba(255,255,255,0.05); color: var(--text-secondary); font-family: 'Space Grotesk'; font-weight: 600; border-right: 1px solid var(--card-border); }
#cota-input { background: transparent; border: none; color: #fff; padding: 12px 15px; font-size: 1.2rem; outline: none; font-family: 'Space Grotesk'; font-weight: 700; width: 100%;}
.btn-action { background: var(--accent-red); color: #fff; border: none; padding: 0 15px; font-weight: 600; cursor: pointer; transition: 0.2s; height: 100%; font-family: 'Inter'; white-space: nowrap;}
.btn-action:hover { background: #ff5454; }

.input-block small { display: block; margin-top: 10px; color: #666; font-size: 0.75rem; }

.simulador-table th { border-bottom-color: rgba(250,62,62,0.3); }
.simulador-table td:nth-child(2) { font-family: 'Space Grotesk'; font-size: 1.5rem; font-weight: 600; color: var(--accent-green); }

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

/* =========================================
   MEDIA QUERIES (RESPONSIVO MOBILE)
========================================= */
@media (max-width: 900px) {
    body { height: auto; overflow-y: auto; }
    .app-layout { flex-direction: column; }
    
    .sidebar { 
        width: 100%; 
        border-right: none; 
        border-bottom: 1px solid var(--card-border);
        padding: 1.5rem;
    }
    
    .brand h1 { font-size: 1.5rem; }
    .nav-menu { margin-top: 1.5rem; flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .nav-item { padding: 0.8rem 1rem; flex: 1; text-align: center; justify-content: center; min-width: 140px; }
    .sidebar-footer { display: none; }
    
    .content { padding: 1.5rem 1rem; }
    .section-header h2 { font-size: 1.5rem; }
    
    .glass-card { padding: 1.2rem; border-radius: 8px; }
    
    /* Tabela */
    .minimal-table td, .minimal-table th { padding-right: 1rem; }
    .minimal-table td:first-child { min-width: 150px; }
    
    /* Timeline Mobile Focus */
    .timeline { flex-direction: column; gap: 2rem; padding: 1rem 0 1rem 1rem; width: 100%; }
    .timeline-line { left: 8px; top: 0; bottom: 0; height: auto; width: 2px; }
    .timeline-node { width: 100%; padding-left: 2rem; display: block; }
    .node-dot { position: absolute; left: -11px; top: 0; margin-left: 0; }
    .node-year { margin-bottom: 0.2rem; }
    
    /* Simulador */
    .simulator-header { flex-direction: column; align-items: stretch; gap: 1.5rem; }
    .input-block { width: 100%; max-width: none; }
    .input-wrapper { flex-direction: column; border: none; background: transparent; gap: 10px; }
    .currency { display: none; }
    #cota-input { width: 100%; border: 1px solid var(--card-border); border-radius: 6px; text-align: center; background: rgba(0,0,0,0.5); padding: 15px;}
    .btn-action { width: 100%; padding: 15px; border-radius: 6px; }
}
