:root {
    /* Color Palette */
    --bg-main: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --border-glass: rgba(0, 0, 0, 0.1);
    
    --accent-yellow: #fdb82a;
    --accent-purple: #8b5cf6;
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    --shadow-color: rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(253, 184, 42, 0.15) 0%, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.highlight {
    background: linear-gradient(to right, var(--accent-yellow), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.filters {
    display: flex;
    align-items: center;
    gap: 1rem;
}

select {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    border-color: var(--accent-purple);
}

/* KPIs */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.wide-card {
    grid-column: 1 / -1;
}

.chart-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.chart-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.wide-card .chart-container {
    height: 350px;
}

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

.kpi-card, .chart-card {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.kpi-card:nth-child(1) { animation-delay: 0.1s; }
.kpi-card:nth-child(2) { animation-delay: 0.2s; }
.kpi-card:nth-child(3) { animation-delay: 0.3s; }
.kpi-card:nth-child(4) { animation-delay: 0.4s; }
.chart-card:nth-child(1) { animation-delay: 0.5s; }
.chart-card:nth-child(2) { animation-delay: 0.6s; }
.chart-card:nth-child(3) { animation-delay: 0.7s; }

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

/* Data Table */
.data-table-section {
    margin-top: 1.5rem;
}

.table-container {
    padding: 1.5rem;
    overflow-x: auto;
}

.table-container h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.styled-table thead tr {
    border-bottom: 2px solid var(--accent-purple);
}

.styled-table th {
    padding: 1rem 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

.styled-table td {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.styled-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}
