/**
 * /ki-webapplikationen/ – Hero: statistisches Dashboard (eigenständig, kein Chat/VoIP-Demo).
 */

.kw-dashboard-demo {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 1;
}

.kw-dashboard-glass {
	position: relative;
	width: min(560px, 100%);
	padding: 22px 18px 16px;
	background: rgba(15, 23, 42, 0.62);
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.04),
		0 22px 52px -14px rgba(0, 0, 0, 0.55);
	animation: kwDashFloat 6s ease-in-out infinite;
	pointer-events: auto;
	box-sizing: border-box;
}

.kw-dashboard-glass::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 52%);
	pointer-events: none;
}

@keyframes kwDashFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}

.kw-dash-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 44px;
	position: relative;
	z-index: 1;
}

.kw-dash-title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.kw-dash-live-dot {
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22d3ee;
	box-shadow: 0 0 10px rgba(34, 211, 238, 0.75);
	animation: kwDashPulse 2s ease-in-out infinite;
}

@keyframes kwDashPulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.65; transform: scale(0.92); }
}

.kw-dash-title-wrap h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: rgba(248, 250, 252, 0.98);
	line-height: 1.25;
}

/* Hero Desktop: Dashboard oben ausrichten (nicht vertikal zentrieren) */
@media (min-width: 769px) {
	body.page-ki-webapplikationen .subpage-hero .subpage-hero-copy {
		align-items: flex-start !important;
		padding-top: 40px !important;
	}

	body.page-ki-webapplikationen .kw-dashboard-demo {
		align-items: flex-start;
	}
}

.kw-dash-period {
	flex-shrink: 0;
	padding: 5px 10px;
	border-radius: 8px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: rgba(226, 232, 240, 0.92);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.kw-dash-kpis {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 14px;
	position: relative;
	z-index: 1;
}

.kw-dash-kpi {
	padding: 10px 10px 9px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.kw-dash-kpi-val {
	display: block;
	font-size: 17px;
	font-weight: 800;
	color: #f8fafc;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.kw-dash-kpi-val.is-up {
	color: #6ee7b7;
}

.kw-dash-kpi-label {
	display: block;
	margin-top: 3px;
	font-size: 10px;
	font-weight: 600;
	color: rgba(148, 163, 184, 0.95);
	line-height: 1.25;
}

.kw-dash-chart {
	padding: 12px 12px 10px;
	border-radius: 12px;
	background: rgba(2, 6, 23, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.07);
	margin-bottom: 12px;
	position: relative;
	z-index: 1;
}

.kw-dash-chart-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 11px;
	font-weight: 700;
	color: rgba(226, 232, 240, 0.92);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.kw-dash-chart-legend {
	display: flex;
	gap: 10px;
	font-size: 9px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: rgba(148, 163, 184, 0.95);
}

.kw-dash-chart-legend span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.kw-dash-chart-legend i {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 2px;
}

.kw-dash-legend-in i { background: #38bdf8; }
.kw-dash-legend-out i { background: #a78bfa; }

.kw-dash-bars {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	align-items: end;
	height: 108px;
}

.kw-dash-bar-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	height: 100%;
	justify-content: flex-end;
}

.kw-dash-bar-stack {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: 88px;
}

.kw-dash-bar {
	width: 14px;
	border-radius: 4px 4px 2px 2px;
	transform-origin: bottom;
	animation: kwDashBarGrow 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	opacity: 0;
}

.kw-dash-bar-in {
	background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
	box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.kw-dash-bar-out {
	background: linear-gradient(180deg, #c4b5fd 0%, #7c3aed 100%);
	box-shadow: 0 0 12px rgba(167, 139, 250, 0.28);
}

.kw-dash-bar-col:nth-child(1) .kw-dash-bar { animation-delay: 0.15s; }
.kw-dash-bar-col:nth-child(2) .kw-dash-bar { animation-delay: 0.28s; }
.kw-dash-bar-col:nth-child(3) .kw-dash-bar { animation-delay: 0.41s; }

@keyframes kwDashBarGrow {
	from { transform: scaleY(0); opacity: 0; }
	to { transform: scaleY(1); opacity: 1; }
}

.kw-dash-bar-label {
	font-size: 10px;
	font-weight: 600;
	color: rgba(203, 213, 225, 0.92);
	text-align: center;
	line-height: 1.2;
}

.kw-dash-status {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 12px;
	position: relative;
	z-index: 1;
}

.kw-dash-status-item {
	padding: 8px 8px 7px;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.07);
}

.kw-dash-status-name {
	display: block;
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: rgba(148, 163, 184, 0.95);
	margin-bottom: 4px;
}

.kw-dash-status-count {
	display: block;
	font-size: 14px;
	font-weight: 800;
	color: #f1f5f9;
	line-height: 1.1;
}

.kw-dash-status-delta {
	display: block;
	margin-top: 2px;
	font-size: 9px;
	font-weight: 600;
	color: #6ee7b7;
}

.kw-dash-status-delta.is-down {
	color: #fca5a5;
}

.kw-dash-insight {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(8, 145, 178, 0.14);
	border: 1px solid rgba(34, 211, 238, 0.22);
	position: relative;
	z-index: 1;
}

.kw-dash-insight svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	color: #67e8f9;
	margin-top: 1px;
}

.kw-dash-insight p {
	margin: 0;
	font-size: 11px;
	line-height: 1.45;
	color: rgba(226, 232, 240, 0.94);
}

.kw-dash-insight strong {
	color: #f8fafc;
	font-weight: 700;
}

@media (max-width: 1024px) {
	.kw-dashboard-glass {
		width: min(480px, 96%);
		padding: 16px;
	}

	.kw-dash-kpi-val {
		font-size: 15px;
	}
}

@media (max-width: 768px) {
	.kw-dashboard-demo {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kw-dashboard-glass,
	.kw-dash-live-dot,
	.kw-dash-bar {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}
