:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #2b2d42;
    --text-secondary: #8d99ae;
    --sidebar-bg: #ffffff;
    --sidebar-text: #2b2d42;
    --border-color: #edf2f4;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 25px 30px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    text-decoration: none;
    color: var(--sidebar-text);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(67, 97, 238, 0.05);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.sidebar-nav a i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
}

/* Top Navbar */
.top-navbar {
    background-color: var(--card-bg);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    padding: 10px 15px;
    border-radius: 8px;
    width: 300px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.search-bar i {
    color: var(--text-secondary);
    margin-right: 10px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.filter-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-section select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-section select:hover {
    border-color: var(--primary-color);
}

.export-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
}

.card:nth-child(2) .card-icon {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
}

.card:nth-child(3) .card-icon {
    background-color: rgba(247, 37, 133, 0.1);
    color: var(--warning-color);
}

.card:nth-child(4) .card-icon {
    background-color: rgba(63, 55, 201, 0.1);
    color: var(--secondary-color);
}

.card-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 5px;
}

.card-info p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.chart-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.chart-container:hover {
    box-shadow: var(--hover-shadow);
}

.chart-container.span-2 {
    grid-column: span 2;
}

.chart-container.span-3 {
    grid-column: span 3;
}

.chart-container h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.canvas-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-container.span-2,
    .chart-container.span-3 {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-logo span, .sidebar-nav a span {
        display: none;
    }
    
    .sidebar-logo {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
    
    .sidebar-nav a {
        justify-content: center;
        padding: 15px 0;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .search-bar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-logo {
        padding: 0;
        border: none;
        margin-bottom: 0;
    }
    
    .sidebar-nav {
        margin: 0;
        flex-direction: row;
        gap: 10px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .filter-section {
        flex-wrap: wrap;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container.span-2, 
    .chart-container.span-3,
    .chart-container:nth-child(3) {
        grid-column: span 1;
    }
}
