:root {
    /* Color Palette - Premium Dark Theme */
    --bg-dark: #0f172a;      /* Slate 900 */
    --bg-darker: #020617;    /* Slate 950 */
    --card-bg: rgba(30, 41, 59, 0.45); /* Slate 800 with opacity */
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Text Colors */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #94a3b8; /* Slate 400 */
    
    /* Accent Colors */
    --color-blue: #3b82f6;
    --color-purple: #8b5cf6;
    --color-pink: #ec4899;
    --color-green: #10b981;
    --color-yellow: #f59e0b;
    --color-cyan: #06b6d4;
    
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    /* Gradient mesh background */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 30%),
        radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.03), transparent 40%);
    background-attachment: fixed;
    padding: 2rem;
}

/* Typography Utilities */
.text-blue { color: var(--color-blue) !important; }
.text-purple { color: var(--color-purple) !important; }
.text-pink { color: var(--color-pink) !important; }
.text-green { color: var(--color-green) !important; }
.text-yellow { color: var(--color-yellow) !important; }
.text-cyan { color: var(--color-cyan) !important; }

/* Glassmorphism utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.dashboard-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    /* Text Gradient */
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.kpi-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.kpi-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.25rem;
    flex-shrink: 0;
}

.icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--color-blue); }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--color-purple); }
.icon-pink { background: rgba(236, 72, 153, 0.15); color: var(--color-pink); }
.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--color-green); }

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.kpi-subtext {
    font-size: 0.9rem;
    color: #cbd5e1;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-container {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
}

.chart-tabs {
    display: flex;
    background: rgba(0,0,0,0.25);
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0.35rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-body {
    flex: 1;
    position: relative;
    min-height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-footer-info {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-around;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Insights Section */
.insights-section {
    padding: 2rem;
}

.insights-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.insight-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
}

.insight-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

.insight-icon {
    font-size: 1.75rem;
    color: var(--color-yellow);
    background: rgba(245, 158, 11, 0.15);
    width: 56px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.insight-card:nth-child(2) .insight-icon {
    color: var(--color-green);
    background: rgba(16, 185, 129, 0.15);
}

.insight-card:nth-child(3) .insight-icon {
    color: var(--color-blue);
    background: rgba(59, 130, 246, 0.15);
}

.insight-text h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #f8fafc;
    font-weight: 600;
}

.insight-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body { padding: 1rem; }
    .dashboard-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .btn { width: 100%; justify-content: center; }
    .kpi-icon { width: 48px; height: 48px; font-size: 1.5rem; }
    .kpi-value { font-size: 1.4rem; }
}
