/* --- Global Variables --- */
:root {
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --accent-color: #4299e1;
    --accent-hover: #3182ce;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- Resets & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px;
}

/* --- Header & Upload Button --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

input[type="file"] {
    display: none; /* Hide default input */
}

.custom-file-upload {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    display: none; /* Add this line to hide the empty dashboard initially */
}

.custom-file-upload:hover {
    background-color: var(--accent-hover);
}

/* --- Layout Grids --- */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

/* --- Cards --- */
.kpi-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.kpi-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 15px;
    min-height: 400px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .charts-grid {
        grid-template-columns: 1fr; /* Stack charts on mobile */
    }
}