.datastream-wrap .description {
	max-width: 720px;
}

.datastream-dashboard {
	margin-top: 20px;
}

.datastream-loading {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 24px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}

.datastream-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.datastream-toolbar-actions {
	display: flex;
	gap: 8px;
}

.datastream-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-bottom: 20px;
}

.datastream-stat-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
	padding: 16px;
}

.datastream-stat-card.is-audit {
	border-left-color: #9b51e0;
}

.datastream-stat-card.is-telemetry {
	border-left-color: #00a32a;
}

.datastream-stat-card.is-generic {
	border-left-color: #dba617;
}

.datastream-stat-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #646970;
	margin-bottom: 6px;
}

.datastream-stat-value {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	color: #1d2327;
}

.datastream-stat-meta {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #646970;
}

.datastream-notice {
	padding: 12px 14px;
	border-radius: 4px;
	margin-bottom: 16px;
}

.datastream-notice.is-error {
	background: #fcf0f1;
	border: 1px solid #d63638;
	color: #8a2424;
}

.datastream-notice.is-success {
	background: #edfaef;
	border: 1px solid #00a32a;
	color: #1e4b2d;
}

.datastream-notice.is-info {
	background: #f0f6fc;
	border: 1px solid #2271b1;
	color: #1d3f66;
}

.datastream-table-wrap {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	overflow: hidden;
}

.datastream-table {
	width: 100%;
	border-collapse: collapse;
}

.datastream-table th,
.datastream-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid #f0f0f1;
	vertical-align: top;
}

.datastream-table th {
	background: #f6f7f7;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #50575e;
}

.datastream-table tbody tr:hover {
	background: #f9fafb;
}

.datastream-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.datastream-badge.is-audit_log {
	background: #f3e8ff;
	color: #6b21a8;
}

.datastream-badge.is-sensor_telemetry {
	background: #dcfce7;
	color: #166534;
}

.datastream-badge.is-generic {
	background: #fef3c7;
	color: #92400e;
}

.datastream-payload-toggle {
	margin-top: 6px;
}

.datastream-payload {
	display: none;
	margin-top: 8px;
	padding: 10px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	white-space: pre-wrap;
	word-break: break-word;
	max-height: 220px;
	overflow: auto;
}

.datastream-payload.is-open {
	display: block;
}

.datastream-empty {
	padding: 40px 24px;
	text-align: center;
	background: #fff;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
}

.datastream-empty h2 {
	margin: 0 0 8px;
	font-size: 18px;
}

.datastream-empty p {
	margin: 0 0 16px;
	color: #646970;
}

.datastream-settings-meta {
	margin-top: 32px;
	padding: 16px 20px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	max-width: 720px;
}

.datastream-settings-meta ul {
	margin: 8px 0 0;
	padding-left: 20px;
}

.datastream-settings-meta code {
	word-break: break-all;
}

.datastream-tabs {
	margin-bottom: 20px;
}

.datastream-health-banner {
	padding: 14px 18px;
	border-radius: 4px;
	margin: 16px 0 20px;
	border: 1px solid #c3c4c7;
	background: #fff;
}

.datastream-health-banner.is-healthy {
	border-left: 4px solid #00a32a;
}

.datastream-health-banner.is-critical {
	border-left: 4px solid #d63638;
}

.datastream-health-list {
	margin: 8px 0 0 18px;
}

.datastream-health-list.is-issues {
	color: #8a2424;
}

.datastream-tools-panel {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px 24px;
	margin-top: 16px;
}

.datastream-tools-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 16px;
}

.datastream-tool-result {
	padding: 10px 14px;
	border-radius: 4px;
	min-height: 20px;
}

.datastream-tool-result.is-success {
	background: #edfaef;
	border: 1px solid #00a32a;
}

.datastream-tool-result.is-error {
	background: #fcf0f1;
	border: 1px solid #d63638;
}

.datastream-diagnostics-table th {
	width: 220px;
	font-weight: 600;
}

.datastream-rest-list {
	margin: 8px 0 0;
	padding-left: 20px;
}

.datastream-rest-list code {
	word-break: break-all;
}

#datastream-test-result.is-success {
	color: #00a32a;
	margin-left: 8px;
}

#datastream-test-result.is-error {
	color: #d63638;
	margin-left: 8px;
}

.datastream-settings-form .form-table th {
	width: 240px;
}

/* --- 2.1.0: stream health cards --- */

.datastream-stream-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
	margin: 16px 0 24px;
}

.datastream-stream-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	padding: 14px 16px;
}

.datastream-stream-card.is-paused {
	opacity: 0.65;
}

.datastream-stream-card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.datastream-dots {
	display: inline-flex;
	gap: 3px;
}

.datastream-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
}

.datastream-dot.is-ok {
	background: #00a32a;
}

.datastream-dot.is-bad {
	background: #d63638;
}

.datastream-stream-card-meta {
	margin: 6px 0;
	color: #646970;
}

.datastream-stream-card-note {
	margin: 6px 0;
	font-size: 12px;
}

.datastream-stream-card-note.is-warn {
	color: #996800;
}

.datastream-stream-card-actions {
	display: flex;
	gap: 6px;
	margin: 10px 0 0;
	flex-wrap: wrap;
}

.datastream-hero-empty {
	text-align: center;
	background: #fff;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	padding: 48px 24px;
	margin-top: 16px;
}

.datastream-hero-empty h2 {
	font-size: 1.6em;
	margin: 0 0 8px;
}

/* --- 2.1.0: sectioned stream form --- */

.ds-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	margin: 0 0 12px;
	max-width: 860px;
}

.ds-card > summary {
	cursor: pointer;
	padding: 12px 16px;
	font-weight: 600;
	user-select: none;
}

.ds-card[open] > summary {
	border-bottom: 1px solid #e0e0e0;
}

.ds-card-hint {
	font-weight: 400;
	color: #646970;
	margin-left: 8px;
	font-size: 12px;
}

.ds-card-body {
	padding: 4px 16px 16px;
}

.ds-clear {
	margin-left: 10px;
	font-size: 12px;
	color: #b32d2e;
}

.ds-repeater {
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 10px 14px;
	margin: 12px 0;
}

.ds-repeater legend {
	font-weight: 600;
	padding: 0 6px;
}

.ds-repeater-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0;
}

.ds-rep-arrow {
	color: #646970;
}

.ds-rep-remove {
	color: #b32d2e;
	text-decoration: none;
	font-size: 16px;
}
