:root {
    --primary: #FFB800;        /* amarelo Ecar */
    --primary-dark: #e6a600;
    --secondary: #1a1a1a;      /* grafite */
    
    --bg-dark: #0a0a0a;        /* fundo mais premium */
    --card-glass: rgba(255, 184, 0, 0.05);

    --text-main: #ffffff;
    --text-muted: #9ca3af;

    --success: #10b981;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Sidebar Glassmorphism */
.sidebar {
    position: fixed;
    width: 260px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    z-index: 100;
}

.logo { width: 150px; margin-bottom: 3rem; }

.sidebar ul { list-style: none; }
.sidebar li { margin: 1.5rem 0; }
.sidebar a { color: #94a3b8; text-decoration: none; transition: 0.3s; font-weight: 500; }
.sidebar li.active a, .sidebar a:hover { color: var(--primary); }

/* Main Content */
.content { margin-left: 260px; padding: 2rem; }

/* Hero Section */
.hero {
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    overflow: hidden;
    margin-bottom: 2rem;
}

#three-canvas-container {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
}

.hero-text { padding: 4rem; z-index: 2; width: 60%; }
.hero-text h1 { font-size: 3rem; margin-bottom: 1rem; }
.gradient-text {
    background: linear-gradient(90deg, #FFB800, #ffd54f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* Glass Cards */
.glass {
    background: var(--card-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 184, 0, 0.15);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.glass:hover { transform: translateY(-5px);
box-shadow: 0 20px 40px rgba(255, 184, 0, 0.15); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card .value { font-size: 2rem; font-weight: bold; margin: 0.5rem 0; }
.trend.up { color: #10b981; }
.trend.down { color: #ef4444; }

/* AI Narrative */
.ai-summary { margin-bottom: 2rem; border-left: 4px solid var(--primary); }
#ai-narrative { line-height: 1.6; color: #cbd5e1; }

.loading-skeleton {
    height: 60px;
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Charts */
.chart-container { height: 400px; }