/* Analytics Dashboard Styles */

.content {
    max-width: 1300px;
}

/* Metric Cards */
.metric-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.2s ease-in-out;
}

.metric-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
}

.metric-content {
    flex: 1;
}

.metric-content h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.metric-content p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.metric-change {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Chart Cards */
.chart-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease-in-out;
}

.chart-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--chart-text-color);
    margin: 0;
}

.chart-container {
    width: 100%;
    height: 300px;
    min-height: 300px;
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-card .echarts-for-react {
    color: var(--chart-text-color);
}

/* Form Controls */
.form-select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.form-select-sm {
    padding: 0.25rem 2rem 0.25rem 0.75rem;
    font-size: 0.75rem;
}

/* Dark Mode Styles */
.dark .metric-card,
.dark .chart-card {
    background-color: #1f2937;
    border-color: #374151;
}

.dark .metric-icon {
    background-color: #374151;
    color: #e5e7eb;
}

.dark .metric-content h3,
.dark .metric-change {
    color: #9ca3af;
}

.dark .metric-content p {
    color: #f3f4f6;
}

.dark .form-select {
    background-color: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .metric-card {
        padding: 1rem;
    }
    
    .metric-icon {
        width: 40px;
        height: 40px;
    }
    
    .metric-content p {
        font-size: 1.25rem;
    }
}

/* Additional Charts Section */
.additional-charts {
    margin-top: 1.5rem;
}

/* Chart colors */
:root {
    --chart-text-color: #374151;
    --chart-line-color: #374151;
    --chart-background: transparent;
}

.dark {
    --chart-text-color: #e5e7eb;
    --chart-line-color: #e5e7eb;
    --chart-background: transparent;
}

/* Loading States */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background-color: #e5e7eb;
}

.dark .loading {
    background-color: #374151;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

@media (max-width: 768px) {
    .metric-card {
        padding: 1rem;
    }
    
    .metric-icon {
        width: 40px;
        height: 40px;
    }
    
    .metric-content p {
        font-size: 1.25rem;
    }
}

/* Additional Charts Section */
.additional-charts {
    margin-top: 1.5rem;
}

/* Chart colors */
:root {
    --chart-text-color: #374151;
    --chart-line-color: #374151;
    --chart-background: transparent;
}

.dark {
    --chart-text-color: #e5e7eb;
    --chart-line-color: #e5e7eb;
    --chart-background: transparent;
}

/* Loading States */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background-color: #e5e7eb;
}

.dark .loading {
    background-color: #374151;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}
