html, body {
  width: 100%;
  overflow-x: hidden;
}

/* Default light theme */
body[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #222;
  --card-bg: #f5f5f5;
}

/* Dark theme */
body[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #fff;
  --card-bg: #2a2a2a;
}

.insight-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.insight-filter a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  margin-right: 15px;
  transition: color 0.2s;
}

.insight-filter a.active {
 	padding: 4px 12px;
	background: #2563EB;
	border-radius: 5PX;
	color: white;
}

.insight-filter a:hover {
  color: whit;
}

.insight-content {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 20px;
	margin: 24px 0 0 0;
}

.insight-details {
	padding: 24px;
	color: #16A34A;
	background: var(--bg-color);
	border-radius: 5px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.01), 
	            0 1px 1px rgba(0, 0, 0, 0.08);
}

.insight-details:nth-child(2) {
	color: #DC2626;
}

.insight-details:nth-child(3) {
	color: #2563EB;
}

.insight-text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.insight h1 {
	font-size: 24px;
}

.insight-text p {
	color: var(--text-color);
	font-size: 14px;
}

.income-container {
  margin: 24px 0 0;
  padding: 16px 20px;
  background: var(--bg-color);
  border-radius: 8px;
  min-height: 300px; 
  max-height: 400px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.income-container h1 {
	font-size: 18px;
	margin: 0 0 20px;
}

.income-container canvas {
  flex: 1;
  width: 100% !important;
  height: auto !important;
  max-height: 260px;
}

.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 8px; /* keeps breathing space on mobile */
}


.chart-content {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.chart-content h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-color, #111827);
  white-space: normal;
  word-break: break-word;
}

.chart-content .pie-chart,
.chart-content .bar-chart {
  position: relative;
  height: 250px;
  width: 100%;
  overflow: hidden;
}

.chart-content h2 {
 	font-size: 18px;
 	margin: 0 0 16px;
}


@media only screen and (max-width: 1023px) {
	.charts-container {
		grid-template-columns: 1fr;
	}
}

@media only screen and (max-width: 767px) {
	.insight-content {
		grid-template-columns: 1fr;
	}
}