.dashboard {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.stats-header h2 {
    font-size: 1.5rem;
    color: #111827;
    margin: 0;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 6px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.title {
    font-size: 18px;
    color: #1f2937;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title i {
    color: #3b82f6;
    font-size: 20px;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    flex: 1;
}

.stat-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    position: relative;
    transition: all 0.3s ease;
}

.stat-circle::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-circle.total::before { border-color: #3b82f6; }
.stat-circle.instock::before { border-color: #10b981; }
.stat-circle.warning::before { border-color: #f59e0b; }
.stat-circle.danger::before { border-color: #ef4444; }

.stat-circle.total { background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1)); }
.stat-circle.instock { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1)); }
.stat-circle.warning { background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1)); }
.stat-circle.danger { background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1)); }

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.filter-btn.primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}

.time-select {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.time-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.time-select {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.time-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Stat Circles Container */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.time-select {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.time-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    min-width: 200px;
    flex: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
}

.stat-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Product stats */
.stat-card.total .card-icon {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.stat-card.instock .card-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card.warning .card-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-card.danger .card-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Revenue stats */
.stat-card.revenue .card-icon {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.stat-card.orders .card-icon {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.stat-card.average .card-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

/* Staff stats */
.stat-card.staff-total .card-icon {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.stat-card.staff-active .card-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card.staff-leave .card-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.stat-circle {
    border: 2px solid #e5e7eb;
}

.stat-circle.available {
    border-color: #3b82f6;
}

.stat-circle.warning {
    border-color: #f59e0b;
}

.stat-circle.danger {
    border-color: #ef4444;
}

.stat-circle:hover {
    transform: translateY(-2px);
}

.stat-circle.available:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.stat-circle.warning:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.stat-circle.danger:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.revenue-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.revenue-display {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.revenue-amount {
    font-size: 2rem;
    font-weight: 600;
    color: #10b981;
    text-align: center;
}

.revenue-chart {
    height: 300px;
    width: 100%;
}

/* Card styles for different types */
.stat-card.total::after { background-color: #3b82f6; }
.stat-card.instock::after { background-color: #10b981; }
.stat-card.warning::after { background-color: #f59e0b; }
.stat-card.danger::after { background-color: #ef4444; }

.stat-card.revenue::after { background-color: #3b82f6; }
.stat-card.orders::after { background-color: #8b5cf6; }
.stat-card.average::after { background-color: #06b6d4; }

.stat-card.staff-total::after { background-color: #3b82f6; }
.stat-card.staff-active::after { background-color: #10b981; }
.stat-card.staff-leave::after { background-color: #f59e0b; }

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .stat-circles {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-circle {
        width: 160px;
        height: 160px;
    }

    .circle-number {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .dashboard {
        padding: 16px;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        text-align: center;
    }

    .stat-circles {
        gap: 16px;
    }

    .stat-circle {
        width: 140px;
        height: 140px;
    }

    .circle-number {
        font-size: 1.75rem;
    }

    .revenue-chart {
        height: 250px;
    }
}

@media (max-width: 640px) {
    .stat-circle {
        width: calc(50% - 8px);
        height: auto;
        aspect-ratio: 1;
    }

    .circle-number {
        font-size: 1.5rem;
    }

    .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard {
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 16px;
    }

    .section-title i {
        font-size: 18px;
    }
}

/* Customer Flow Chart */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-controls button {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
}

.chart-controls button.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.chart-body {
    height: 300px;
}

/* Staff Container */
.staff-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.staff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.staff-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background: #1976d2;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary {
    background: white;
    color: #1976d2;
    padding: 0.5rem 1rem;
    border: 1px solid #1976d2;
    border-radius: 6px;
    cursor: pointer;
}

.staff-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Responsive Design */
@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-container {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .main-stats {
        grid-template-columns: 1fr;
    }
    
    .chart-controls {
        flex-wrap: wrap;
    }
}