.motorica-demo-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex: 0 0 auto;
	min-height: 1.75rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: var(--motorica-theme-surface, #fff);
	color: var(--motorica-theme-ink, #0d234b);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

.topbar-title--demo .page-title {
	flex: 0 1 auto;
	min-width: 0;
}

.demo-system-page {
	max-width: 1180px;
	padding-bottom: 2rem;
}

.demo-system-overview,
.demo-system-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.25rem 1.4rem;
	border-radius: 12px;
	background: var(--motorica-theme-surface, #fff);
}

.demo-system-overview {
	border-top: 4px solid var(--motorica-primary);
}

.demo-system-overview h2,
.demo-system-counts h2,
.demo-system-actions h2 {
	margin: 0 0 0.35rem;
	color: var(--motorica-theme-ink, var(--motorica-secondary));
	font-size: 1.15rem;
	font-weight: 700;
	text-wrap: balance;
}

.demo-system-overview p,
.demo-system-actions p,
.demo-system-empty p {
	max-width: 70ch;
	margin: 0;
	color: var(--motorica-text-muted);
	line-height: 1.55;
	text-wrap: pretty;
}

.demo-system-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.45rem;
	color: #a33f00;
	font-size: 0.82rem;
	font-weight: 700;
}

.demo-system-health {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex: 0 0 auto;
	min-width: 230px;
	padding: 0.8rem 1rem;
	border-radius: 10px;
}

.demo-system-health i { font-size: 1.4rem; }
.demo-system-health span { display: grid; gap: 0.1rem; }
.demo-system-health small { color: inherit; }
.demo-system-health--ok { background: var(--motorica-theme-positive-surface, #e8f8e3); color: var(--motorica-theme-positive-ink, #205f0e); }
.demo-system-health--attention { background: var(--motorica-theme-warning-surface, #fff0e7); color: var(--motorica-theme-warning-ink, #8a3500); }

.demo-system-identity {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	margin-top: 1rem;
	overflow: hidden;
	border-radius: 10px;
	background: var(--motorica-theme-hover, #cbd5e1);
}

.demo-system-identity > div {
	display: grid;
	gap: 0.2rem;
	min-width: 0;
	padding: 0.85rem 1rem;
	background: var(--motorica-theme-soft, #f8fafc);
}

.demo-system-identity span,
.demo-system-count span {
	color: var(--motorica-text-muted);
	font-size: 0.75rem;
	font-weight: 600;
}

.demo-system-identity strong {
	overflow-wrap: anywhere;
	color: var(--motorica-text);
	font-size: 0.9rem;
}

.demo-system-counts {
	margin-top: 1rem;
	padding: 1.1rem 1.25rem 1.25rem;
	border-radius: 12px;
	background: var(--motorica-theme-surface, #fff);
}

.demo-system-counts__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.demo-system-count {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	column-gap: 0.65rem;
	flex: 1 1 135px;
	min-width: 135px;
	padding: 0.75rem;
	border-radius: 9px;
	background: var(--motorica-theme-soft, #f1f5f9);
}

.demo-system-count i {
	grid-row: 1 / 3;
	align-self: center;
	color: var(--motorica-primary);
	font-size: 1.15rem;
}

.demo-system-count strong {
	color: var(--motorica-theme-ink, var(--motorica-secondary));
	font-size: 1.25rem;
	font-variant-numeric: tabular-nums;
}

.demo-system-actions { margin-top: 1rem; }
.demo-system-actions__buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.65rem; }

.demo-system-empty {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: 1rem;
	padding: 1rem 1.2rem;
	border-radius: 10px;
	background: var(--motorica-theme-info-surface, #eef5ff);
	color: var(--motorica-theme-ink, var(--motorica-secondary));
}

.demo-system-empty > i { font-size: 1.5rem; }
.demo-system-safety-note { margin: 0.9rem 0 0; color: var(--motorica-text-muted); font-size: 0.85rem; }
.demo-system-safety-note i { margin-inline-end: 0.35rem; color: var(--motorica-theme-ink, var(--motorica-secondary)); }

@media (max-width: 991.98px) {
	.demo-system-overview,
	.demo-system-actions { align-items: stretch; flex-direction: column; }
	.demo-system-health { min-width: 0; }
	.demo-system-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.demo-system-actions__buttons { justify-content: flex-start; }
}

@media (max-width: 575.98px) {
	.topbar-title--demo { flex-direction: column; gap: 2px; }
	.topbar-title--demo .motorica-demo-badge { min-height: 1.15rem; padding: 0.15rem 0.45rem; font-size: 0.58rem; }
	.demo-system-overview,
	.demo-system-counts,
	.demo-system-actions { padding: 1rem; }
	.demo-system-identity { grid-template-columns: 1fr; }
	.demo-system-actions__buttons > .btn { width: 100%; min-height: var(--motorica-touch-min); }
}

@media (prefers-reduced-motion: reduce) {
	.demo-system-page *,
	.demo-system-page *::before,
	.demo-system-page *::after { transition: none !important; }
}
