/*=============================================
Dashboard de Estadísticas
=============================================*/

.estadisticas-page {
	padding: 24px 28px;
}

.estadisticas-page .page-title {
	font-weight: 700;
	font-size: 24px;
	color: #1f2937;
}

/* ---- Filtros de fecha (pills) ---- */

.stats-filters {
	gap: 8px;
}

.stats-filter-pill {
	border: 1px solid #dfe3e8;
	background: #fff;
	color: #4b5563;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 999px;
	cursor: pointer;
	transition: all .15s ease;
	white-space: nowrap;
}

.stats-filter-pill:hover {
	border-color: #2563eb;
	color: #2563eb;
}

.stats-filter-pill.active {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

.stats-filter-pill--custom {
	background: #111827;
	border-color: #111827;
	color: #fff;
}

.stats-filter-pill--custom:hover {
	opacity: .9;
	color: #fff;
}

/* ---- Tarjetas KPI ---- */

.stats-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.stats-kpi-card {
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 14px;
	padding: 18px 20px;
	display: flex;
	align-items: center;
	gap: 14px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}

.stats-kpi-icon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	font-size: 20px;
	color: #fff;
	flex-shrink: 0;
}

.stats-kpi-icon--green  { background: linear-gradient(135deg, #34d399, #059669); }
.stats-kpi-icon--red    { background: linear-gradient(135deg, #f87171, #dc2626); }
.stats-kpi-icon--blue   { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.stats-kpi-icon--purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.stats-kpi-icon--teal   { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.stats-kpi-icon--gray   { background: linear-gradient(135deg, #9ca3af, #4b5563); }

.stats-kpi-value {
	font-size: 22px;
	font-weight: 700;
	color: #111827;
	line-height: 1.2;
}

.stats-kpi-label {
	font-size: 13px;
	color: #6b7280;
}

/* ---- Gráficos ---- */

.stats-charts-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.stats-chart-card {
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 14px;
	padding: 18px 20px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
	min-height: 300px;
}

.stats-chart-card--wide {
	grid-column: 1 / -1;
}

.stats-chart-card h5 {
	font-size: 15px;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 14px;
}

.stats-chart-card canvas {
	max-height: 260px;
}

.stats-empty-state {
	text-align: center;
	padding: 60px 0;
	color: #9ca3af;
}

.stats-empty-state i {
	font-size: 40px;
	display: block;
	margin-bottom: 10px;
}

@media (max-width: 900px) {
	.stats-charts-grid {
		grid-template-columns: 1fr;
	}
	.stats-chart-card--wide {
		grid-column: auto;
	}
}
