/* Reset and Base Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.6;
	color: #374151;
	background-color: #f9fafb;
}

/* Container */
.container {
	width: 100%;
	min-height: 100vh;
	background-color: #f9fafb;
	padding: 1.5rem;
}

.container > * {
	max-width: 80rem;
	margin-left: auto;
	margin-right: auto;
}

/* Header */
.header {
	background-color: white;
	border-radius: 0.5rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.header h1 {
	font-size: 1.875rem;
	font-weight: bold;
	color: #111827;
	margin-bottom: 0.5rem;
}

.header p {
	color: #6b7280;
	margin-bottom: 1rem;
}

/* Alert */
.alert {
	margin-top: 1rem;
	padding: 1rem;
	background-color: #fef2f2;
	border-left: 4px solid #dc2626;
	border-radius: 0.25rem;
	display: flex;
	align-items: flex-start;
}

.alert-icon {
	color: #dc2626;
	margin-top: 0.25rem;
	margin-right: 0.5rem;
	font-size: 1.25rem;
}

.alert-content h2 {
	font-weight: 600;
	color: #991b1b;
	margin-bottom: 0.25rem;
}

.alert-content p {
	font-size: 0.875rem;
	color: #b91c1c;
	margin: 0;
}

/* Main Content */
.main-content {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Metrics Grid */
.metrics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.metric-card {
	background-color: white;
	border-radius: 0.5rem;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
	padding: 1.5rem;
}

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

.metric-header h3 {
	font-size: 0.875rem;
	font-weight: 500;
	color: #6b7280;
}

.trend-icon {
	font-size: 1.25rem;
	font-weight: bold;
}

.trend-up {
	color: #dc2626;
}

.trend-down {
	color: #dc2626;
}

.metric-value {
	font-size: 1.875rem;
	font-weight: bold;
	margin-bottom: 0.25rem;
}

.metric-value.negative {
	color: #dc2626;
}

.metric-value.positive {
	color: #059669;
}

.metric-subtitle {
	font-size: 0.875rem;
	color: #6b7280;
	margin-bottom: 0.5rem;
}

.metric-change {
	font-size: 0.875rem;
	font-weight: 500;
}

.metric-change.negative {
	color: #dc2626;
}

.metric-change.positive {
	color: #059669;
}

/* Chart Container */
.chart-container {
	background-color: white;
	border-radius: 0.5rem;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.chart-container h2 {
	font-size: 1.25rem;
	font-weight: bold;
	margin-bottom: 1rem;
}

.chart-container p {
	font-size: 0.875rem;
	color: #6b7280;
	margin-bottom: 1rem;
}

.chart-container canvas {
	max-width: 100%;
	width: 100% !important;
	max-height: 500px;
	margin-bottom: 0.5rem;
}

/* Chart Insights */
.chart-insights {
	margin-top: 1rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1rem;
}

.insight-card {
	padding: 0.75rem;
	border-radius: 0.25rem;
	border-left: 4px solid #059669;
	background-color: #f0fdf4;
}

.insight-card.negative {
	border-left-color: #dc2626;
	background-color: #fef2f2;
}

.insight-card h4 {
	font-weight: 600;
	color: #065f46;
	margin-bottom: 0.25rem;
}

.insight-card.negative h4 {
	color: #991b1b;
}

.insight-card p {
	color: #047857;
	font-size: 0.875rem;
	margin: 0;
}

.insight-card.negative p {
	color: #b91c1c;
}

.insight-card small {
	font-size: 0.75rem;
	color: #059669;
}

.insight-card.negative small {
	color: #dc2626;
}

/* Chart Notes */
.chart-notes {
	margin-top: 1rem;
	font-size: 0.75rem;
	color: #6b7280;
}

.chart-notes p {
	margin-bottom: 0.25rem;
}

/* Footer */
.footer {
	margin-top: 1.5rem;
	background-color: white;
	border-radius: 0.5rem;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
	padding: 1.5rem;
}

.data-sources {
	font-size: 0.875rem;
	color: #6b7280;
}

.data-sources .font-semibold {
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.data-sources ul {
	list-style: disc;
	list-style-position: inside;
	margin-bottom: 1rem;
}

.data-sources li {
	margin-bottom: 0.25rem;
}

.data-sources a {
	color: #2563eb;
	text-decoration: none;
}

.data-sources a:hover {
	text-decoration: underline;
}

.data-sources .note {
	margin-top: 1rem;
	font-style: italic;
}

/* Copyright Footer */
.copyright {
	margin-top: 1.5rem;
	padding: 1rem 0;
	border-top: 1px solid #e5e7eb;
	text-align: center;
	font-size: 0.75rem;
	color: #6b7280;
}

.copyright p {
	margin-bottom: 0.5rem;
}

.copyright a {
	color: #2563eb;
	text-decoration: none;
	margin-left: 0.5rem;
}

.copyright a:hover {
	text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		padding: 1rem;
	}

	.header {
		padding: 1rem;
	}

	.header h1 {
		font-size: 1.5rem;
	}

	.metrics-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.chart-insights {
		grid-template-columns: 1fr;
	}

	.chart-container,
	.footer {
		padding: 1rem;
	}

	.data-table {
		font-size: 0.75rem;
	}

	.data-table th,
	.data-table td {
		padding: 0.5rem 0.25rem;
	}
}

@media (max-width: 480px) {
	.container {
		padding: 0.5rem;
	}

	.header h1 {
		font-size: 1.25rem;
	}

	.metric-value {
		font-size: 1.5rem;
	}

	.chart-container h2 {
		font-size: 1.125rem;
	}
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Focus styles for keyboard navigation */
*:focus-visible {
	outline: 2px solid #dc2626;
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.metric-value.negative {
		color: #dc2626;
		font-weight: 900;
	}

	.insight-card.negative {
		border-left-width: 6px;
	}
}

/* Print styles */
@media print {
	.chart-container canvas {
		display: none;
	}

	body {
		background-color: white;
	}

	.container {
		padding: 0;
	}
}
