:root {
    --primary-color: #2e7d32;
    --primary-light: #60ad5e;
    --primary-dark: #005005;
    --secondary-color: #e8f5e9;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.logo h2 {
    font-weight: 600;
    color: var(--primary-dark);
}

nav ul {
    list-style: none;
}

nav ul li {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a i {
    font-size: 1.2rem;
}

nav ul li.active {
    background-color: var(--secondary-color);
}

nav ul li.active a {
    color: var(--primary-color);
}

nav ul li:hover {
    background-color: #f0f0f0;
}

.user-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.5rem 0 0.5rem;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.user-profile p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-title h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.header-title p {
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: var(--primary-dark);
}

/* Statistics Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-card-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stat-card-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.7rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.positive {
    background-color: #e3f8e5;
    color: #2e7d32;
}

.badge.negative {
    background-color: #fdeded;
    color: #d32f2f;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-icon.revenue {
    background-color: #e3f8e5;
    color: var(--primary-color);
}

.stat-card-icon.orders {
    background-color: #e3f2fd;
    color: #1976d2;
}

.stat-card-icon.customers {
    background-color: #fff8e1;
    color: #ff8f00;
}

.stat-card-icon.conversion {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.2rem;
}

.chart-legend {
    display: flex;
    gap: 15px;
}

.chart-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.chart-legend i.current {
    color: var(--primary-color);
}

.chart-legend i.previous {
    color: #e0e0e0;
}

select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    outline: none;
    color: var(--text-primary);
    background-color: var(--card-bg);
}

/* Placeholder charts for demonstration */
.placeholder-chart {
    width: 100%;
    height: 250px;
    background: linear-gradient(0deg, var(--secondary-color) 0%, var(--card-bg) 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.placeholder-chart:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--primary-light) 20%,
        var(--primary-color) 40%,
        var(--primary-color) 60%,
        var(--primary-light) 80%,
        transparent 100%
    );
    animation: wave 2s linear infinite;
    border-radius: 8px;
}

.placeholder-pie {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary-color) 0% 35%,
        var(--primary-light) 35% 60%,
        #ff8f00 60% 75%,
        #1976d2 75% 90%,
        #e0e0e0 90% 100%
    );
    position: relative;
}

.placeholder-pie::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: var(--card-bg);
    border-radius: 50%;
}

@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Recent Orders */
.recent-orders {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 1.2rem;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 15px 10px;
    border-bottom: 1px solid #e0e0e0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

tbody td {
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
}

tbody tr:last-child td {
    border-bottom: none;
}

td img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    vertical-align: middle;
}

.status {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status.completed {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status.processing {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status.pending {
    background-color: #fff8e1;
    color: #ff8f00;
}

.status.cancelled {
    background-color: #fdeded;
    color: #d32f2f;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        padding: 1rem;
    }
    .main-content {
        padding: 1.5rem;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}
