/* ==========================================================================
   Smart Pi UI — shared product dashboard
   Four-tile desktop composition with a shared phone composition for
   content-sized cards and full-width live charts. Self-contained --dashboard-*
   tokens; products supply the data.
   ========================================================================== */

/* ==== SHARED PRODUCT DASHBOARD ==== */
.dashboardPage {
	--dashboard-bg: var(--sp-well);
	--dashboard-surface: #2c2c2c;
	--dashboard-surface-raised: #353535;
	--dashboard-border: #484848;
	--dashboard-text: #f1f3f4;
	--dashboard-muted: #a0a0a0;
	--dashboard-cyan: #00c7ee;
	--dashboard-orange: #e96225;
	--dashboard-green: #31cc4b;
	--dashboard-red: #e05b5b;
	color: var(--dashboard-text);
	font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
}
.content-area:has(.dashboardPage) {
	padding-bottom: 34px !important;
	padding-top: 6px;
	position: relative;
}
.content-area:has(.dashboardHost) .page-heading-row {
	display: none !important;
}
.dashboardLoading {
	align-items: center;
	color: #a0a0a0;
	display: flex;
	gap: 10px;
	justify-content: center;
	min-height: 220px;
}
.dashboardLoading > i,
.dashboardLoadingIcon {
	align-items: center;
	animation: dashboardLoadingSpin 0.8s linear infinite;
	color: #00c7ee;
	display: inline-flex;
	flex: 0 0 20px;
	font-size: 18px;
	height: 20px;
	justify-content: center;
	width: 20px;
}
.dashboardLoadingIcon i {
	color: inherit;
}
@keyframes dashboardLoadingSpin {
	to {
		transform: rotate(1turn);
	}
}
@media (prefers-reduced-motion: reduce) {
	.dashboardLoading > i,
	.dashboardLoadingIcon {
		animation: none;
	}
}
.dashboardLoadError {
	align-items: center;
	background: #2d2f30;
	border: 1px solid #454849;
	border-radius: 8px;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
	color: #d7d9da;
	display: flex;
	gap: 13px;
	margin: 34px auto;
	max-width: 680px;
	padding: 16px;
}
.dashboardLoadErrorIcon {
	align-items: center;
	background: linear-gradient(180deg, #3a3a3a 0%, #242424 100%); background-color:#242424;
	border: 1px solid rgba(0,0,0,0.72);
	border-radius: 6px;
	color: #f3833f;
	display: inline-flex;
	flex: 0 0 38px;
	height: 38px;
	justify-content: center;
	width: 38px;
}
.dashboardLoadErrorIcon svg {
	fill: none;
	height: 22px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 22px;
}
.dashboardLoadError strong,
.dashboardLoadError small {
	display: block;
}
.dashboardLoadError strong {
	color: #f0f1f2;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	margin-bottom: 5px;
}
.dashboardLoadError small {
	color: #aeb2b5;
	font-size: 12px;
	line-height: 1.4;
}
.dashboardPageStatus {
	align-items: center;
	color: var(--dashboard-muted);
	display: flex;
	font-size: 11px;
	gap: 7px;
	justify-content: flex-end;
	line-height: 1;
	margin: 0;
	min-height: 16px;
	position: absolute;
	right: 25px;
	bottom: 12px;
	z-index: 3;
}
.dashboardPage {
	padding-bottom: 0;
	position: static;
}
.dashboardLiveState {
	align-items: center;
	display: inline-flex;
	height: 14px;
	justify-content: center;
	width: 14px;
}
.dashboardLiveState i {
	animation: dashboardGlow 1.65s ease-in-out infinite;
	background: var(--dashboard-green);
	border-radius: 50%;
	box-shadow: 0 0 9px rgba(49, 204, 75, 0.74), 0 0 21px rgba(49, 204, 75, 0.24);
	display: inline-block;
	font-size: 0;
	height: 9px;
	opacity: 0.88;
	width: 9px;
}
.dashboardPageStatus.dashboardUpdatesStale .dashboardLiveState i {
	animation: none;
	background: #c9002f;
	box-shadow: 0 0 10px rgba(201, 0, 47, 0.52);
}
.dashboardUpdatedState {
	color: var(--dashboard-muted);
	font-size: 11px;
	line-height: 1;
	white-space: nowrap;
}
.dashboardUpdatedState time::before {
	content: "Updated ";
}
@keyframes dashboardGlow {
	0%, 100% {
		box-shadow: 0 0 7px rgba(49, 204, 75, 0.46), 0 0 15px rgba(49, 204, 75, 0.14);
		opacity: 0.78;
	}
	48% {
		box-shadow: 0 0 13px rgba(49, 204, 75, 0.86), 0 0 31px rgba(49, 204, 75, 0.38);
		opacity: 1;
	}
}
.dashboardTiles {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	min-height: min(480px, calc(100vh - 125px));
	padding-top: 0;
}
.dashboardTile {
	background: var(--sp-surface);
	border: 1px solid #474747;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	position: relative;
}
.dashboardTile::before {
	display: none;
}
.dashboardTilePerformance::before {
	background: linear-gradient(90deg, var(--dashboard-cyan) 0 50%, var(--dashboard-orange) 50% 100%); background-color:var(--dashboard-orange);
}
.dashboardTileNetwork::before {
	background: #7997aa;
}
.dashboardTileProduct::before {
	background: var(--dashboard-orange);
}
.dashboardTileHeader {
	align-items: center;
	background: linear-gradient(180deg, #f16b2f 0%, #d64c0e 100%); background-color:#f16b2f;
	border-bottom: 2px solid #262626;
	color: #202020;
	display: flex;
	gap: 9px;
	min-height: 44px;
	padding: 6px 9px;
}
.dashboardTileIcon {
	align-items: center;
	background: linear-gradient(180deg, #353535 0%, #242424 100%); background-color:#242424;
	border: 1px solid rgba(0, 0, 0, 0.72);
	border-radius: 5px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.28);
	color: #f1f3f4;
	display: inline-flex;
	height: 30px;
	justify-content: center;
	width: 30px;
}
.dashboardTileIcon svg,
.dashboardDeviceIcon svg {
	fill: none;
	height: 18px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.4;
	width: 18px;
}
.dashboardMetricIcon {
	align-items: center;
	color: var(--dashboard-cyan);
	display: inline-flex;
	flex: 0 0 auto;
	height: 20px;
	justify-content: center;
	width: 20px;
}
.dashboardMetricIcon svg,
.dashboardNetworkAddress svg {
	fill: none;
	height: 18px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
	width: 18px;
}
.dashboardTrendOrange .dashboardMetricIcon {
	color: var(--dashboard-orange);
}
.dashboardSectionLabel {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}
.dashboardSectionLabel i {
	color: var(--dashboard-cyan);
	font-size: 12px;
	line-height: 1;
	min-width: 13px;
	text-align: center;
}
.dashboardTileProduct .dashboardTileIcon {
	color: #f1f3f4;
}
.dashboardTileHeader h3 {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.15;
	margin: 0;
}
.dashboardProductBadge {
	background: rgba(233,98,37,0.13);
	border: 1px solid rgba(233,98,37,0.35);
	border-radius: 999px;
	color: #f28a59;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.08em;
	margin-left: auto;
	padding: 4px 7px;
}
.dashboardDeviceHero,
.dashboardNetworkHero {
	align-items: center;
	background: #272727;
	border-bottom: 1px solid var(--dashboard-border);
	display: flex;
	box-sizing: border-box;
	flex: 0 0 74px;
	gap: 10px;
	height: 74px;
	min-height: 74px;
	padding: 10px 12px;
}
.dashboardDeviceIcon {
	align-items: center;
	background: #30383b;
	border: 1px solid #465258;
	border-radius: 7px;
	color: #91a8b2;
	display: inline-flex;
	height: 50px;
	justify-content: center;
	width: 50px;
}
.dashboardDeviceIcon svg {
	height: 29px;
	stroke-width: 1.35;
	width: 29px;
}
.dashboardDeviceHero div {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.dashboardDeviceHero span,
.dashboardNetworkHero .dashboardHeroCopy > span:last-child {
	color: var(--dashboard-muted);
	font-size: 11px;
}
.dashboardDeviceHero strong {
	font-size: 15px;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dashboardDataList {
	flex: 1;
	margin: 0;
	padding: 3px 11px;
}
.dashboardDataList > div {
	align-items: center;
	border-bottom: 1px solid rgba(72, 72, 72, 0.7);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	min-height: 42px;
	padding: 7px 2px;
}
.dashboardDataList > div:last-child {
	border-bottom: none;
}
.dashboardDataList dt {
	color: var(--dashboard-muted);
	font-size: 11px;
	font-weight: 400;
	margin: 0;
}
.dashboardDataList dd {
	color: var(--dashboard-text);
	font-size: 12px;
	font-weight: 500;
	margin: 0;
	max-width: 65%;
	overflow-wrap: anywhere;
	text-align: right;
}
.dashboardGood {
	color: var(--dashboard-green) !important;
}
.dashboardWarning {
	color: var(--dashboard-red) !important;
}
.dashboardLive {
	color: var(--dashboard-cyan) !important;
}
.dashboardMono {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.dashboardTileLink {
	align-items: center;
	border-top: 1px solid var(--dashboard-border);
	color: #c9c9c9;
	display: flex;
	font-size: 12px;
	font-weight: 500;
	justify-content: space-between;
	padding: 10px 12px;
}
.dashboardTileLink:hover {
	background: #333;
	color: #fff;
}
.dashboardTileFooter {
	box-sizing: border-box;
	flex: 0 0 46px;
	min-height: 46px;
}
.dashboardTileFooterEmpty {
	border-top: 1px solid var(--dashboard-border);
}
.dashboardTileFooterNoBorder {
	border-top: 0;
}
.dashboardTileProduct .dashboardTileFooterEmpty {
	border-top: 0;
}
.dashboardStorage {
	padding: 9px 12px 11px;
}
.dashboardPerformanceHero {
	background: #262626;
	border-bottom: 1px solid var(--dashboard-border);
	box-sizing: border-box;
	flex: 0 0 74px;
	height: 74px;
	min-height: 74px;
}
.dashboardStorage > div:first-child {
	align-items: center;
	display: flex;
	font-size: 11px;
	justify-content: space-between;
	margin-bottom: 2px;
}
.dashboardStorageLabel {
	align-items: center;
	display: inline-flex;
	gap: 7px;
}
.dashboardStorage > div:first-child strong {
	color: #e8e8e8;
	font-size: 13px;
	font-weight: 600;
}
.dashboardStorage > div:first-child span,
.dashboardStorage small {
	color: var(--dashboard-muted);
}
.dashboardStorageBarRow {
	align-items: center;
	display: grid;
	gap: 8px;
	grid-template-columns: 22px minmax(0, 1fr);
}
.dashboardStorageIcon {
	height: 22px;
	width: 22px;
}
.dashboardMetricIcon.dashboardStorageIcon i { color: var(--dashboard-cyan); font-size: 21px; line-height: 1; }
.dashboardPerformanceGrid {
	display: grid;
	flex: 1;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(min-content, 1fr));
	min-height: 0;
	padding: 12px;
}
.dashboardMetricTile {
	background: #272727;
	border: 1px solid #444;
	border-radius: 5px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 0;
	min-width: 0;
	padding: 10px 11px;
}
.dashboardMetricTile > header {
	align-items: flex-start;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	display: flex;
	justify-content: space-between;
	margin: 0;
	min-height: 0;
	padding: 0 !important;
}
.dashboardMetricTile > header > span {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.dashboardMetricTile b {
	align-items: center;
	color: var(--dashboard-muted);
	display: inline-flex;
	font-size: 11px;
	font-weight: 500;
	gap: 7px;
	letter-spacing: 0;
	text-transform: none;
}
.dashboardMetricTile > span,
.dashboardMetricTile small,
.dashboardMetricTile header small {
	color: var(--dashboard-muted);
	font-size: 9px;
	font-weight: 400;
}
.dashboardMetricTile > header strong {
	color: #e8e8e8;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.05;
	text-align: right;
}
.dashboardMetricTile > header strong small {
	font-size: 9px;
	margin-left: 1px;
}
.dashboardMetricTileStorage {
	gap: 8px;
}
.dashboardMetricTileStorage > span {
	font-size: 11px;
}
.dashboardMetricTileStorage small {
	line-height: 1.2;
}
.dashboardTrends {
	display: grid;
	flex: 1;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-height: 0;
	padding: 12px;
}
.dashboardTrend {
	display: grid;
	grid-template-rows: auto minmax(48px, 1fr) auto;
	align-content: center;
	min-width: 0;
}
.dashboardTrend + .dashboardTrend {
	border-left: 1px solid #444;
}
.dashboardTrend header,
.dashboardTrend footer {
	align-items: baseline;
	background: transparent !important;
	display: flex;
	justify-content: space-between;
	border: 0 !important;
	box-shadow: none !important;
	margin: 0;
	min-height: 0;
	padding: 0 3px !important;
}
.dashboardTrend header > span {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.dashboardTrend header b {
	align-items: center;
	color: var(--dashboard-muted);
	display: inline-flex;
	font-size: 11px;
	font-weight: 500;
	gap: 6px;
	text-transform: none;
}
.dashboardTrend header b i {
	color: currentColor;
	font-size: 12px;
	line-height: 1;
	width: 14px;
}
.dashboardTrend header > span small {
	color: #7f858a;
	font-size: 9px;
	font-weight: 400;
}
.dashboardTrend header strong {
	font-size: 18px;
	font-weight: 500;
}
.dashboardTrend header small {
	color: var(--dashboard-muted);
	font-size: 9px;
}
.dashboardTrend svg {
	background-color: transparent !important;
	background-image: linear-gradient(to bottom, transparent 49%, rgba(160, 160, 160, 0.08) 50%, transparent 51%);
	height: auto;
	margin: 5px 0 6px;
	max-height: 74px;
	min-height: 48px;
	overflow: hidden;
	width: 100%;
}
.dashboardTrend polyline {
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	vector-effect: non-scaling-stroke;
}
.dashboardTrend path {
	fill: currentColor;
	fill-opacity: 0.1;
}
.dashboardTrendCyan {
	color: var(--dashboard-cyan);
}
.dashboardTrendOrange {
	color: var(--dashboard-orange);
}
.dashboardTrendGreen {
	color: var(--dashboard-green);
}
.dashboardTrendGreen .dashboardMetricIcon {
	color: var(--dashboard-green);
}
.dashboardTrend header > span small.dashboardGood {
	color: var(--dashboard-green);
}
.dashboardMetricTileDatabaseSize header b,
.dashboardMetricTileDatabaseSpeed header b {
	font-size: 10px;
	gap: 4px;
	white-space: nowrap;
}
.dashboardMetricTileDatabaseSize header > span small,
.dashboardMetricTileDatabaseSpeed header > span small {
	font-size: 8px;
	white-space: nowrap;
}
.dashboardTrend footer {
	border-top: 1px solid #3e3e3e !important;
	color: var(--dashboard-muted);
	font-size: 9px;
	padding-top: 5px !important;
}
.dashboardPerformanceGrid > .dashboardTrend {
	/* Pair CPU with the other performance metrics by their header/footer
	   baselines. CPU can grow its middle summary for additional core rows
	   without vertically centring and downshifting its neighbouring cards. */
	align-content: stretch;
	gap: 10px;
	grid-template-rows: auto minmax(0, 1fr) auto;
}
.dashboardPerformanceGrid > .dashboardTrend svg {
	align-self: center;
	height: 74px;
	margin: 0;
}
.dashboardCpuGraph {
	/* As a grid item this stretches exactly to the tile's middle row. Avoid a
	   percentage height here: it can resolve against a constrained card rather
	   than that row and let the trend paint over the footer. */
	align-self: stretch;
	display: grid;
	gap: 5px;
	/* Core telemetry stays above the trend.  The trend consumes the remaining
	   height of the metric tile, while retaining a usable minimum when a host
	   exposes enough cores to need multiple rows. */
	grid-template-rows: auto minmax(28px, 1fr);
	height: auto;
	min-height: 0;
	overflow: hidden;
}
/* Earlier consumers accidentally left the range footer inside the CPU graph
   wrapper. Keep that markup safe while they adopt the documented sibling
   footer: reserve an explicit third graph row so the SVG cannot occupy it. */
.dashboardCpuGraph:has(> footer) {
	grid-template-rows: auto minmax(28px, 1fr) auto;
}
.dashboardPerformanceGrid > .dashboardMetricTileCpu .dashboardCpuGraph svg {
	align-self: stretch;
	display: block;
	height: 100%;
	max-height: none;
	min-height: 28px;
	margin: 0;
	width: 100%;
}
.dashboardPerformanceGrid > .dashboardMetricTileCpu {
	/* Match the other metric cards: header and footer keep their baselines and
	   the CPU summary plus its trend fill the available middle row. */
	grid-template-rows: auto minmax(0, 1fr) auto;
}
.dashboardCpuSummary {
	min-width: 0;
}
.dashboardCpuSummary .dashboardCoreBlock {
	/* Keep the core strip and trend as wide as the tile. The aggregate is in
	   the header with the other metric values, rather than consuming strip width. */
	max-width: none;
	width: 100%;
}
.dashboardCpuValue {
	color: #e8e8e8;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	text-align: right;
}
.dashboardCpuValue small {
	color: var(--dashboard-muted);
	font-size: 9px;
	margin-left: 1px;
}
.dashboardMemoryBody {
	display: grid;
	gap: 5px;
	grid-template-rows: auto minmax(0, 1fr);
	min-height: 0;
}
.dashboardMemoryBody svg {
	width: 100%;
}
.dashboardMemoryDetails {
	display: grid;
	gap: 3px;
}
.dashboardMemoryDetail {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
}
.dashboardMemoryDetail span {
	color: var(--dashboard-muted);
	font-size: 8px;
	line-height: 1.2;
}
.dashboardMemoryDetail b {
	color: #d7d7d7;
	font-weight: 500;
	font-size: 9px;
	line-height: 1.2;
	white-space: nowrap;
}
.dashboardCoreBlock {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 2px;
	max-width: 160px;
	margin: 0;
	min-width: 0;
	width: 100%;
}
.dashboardCoreLabel {
	color: var(--dashboard-muted);
	font-size: 8px;
	letter-spacing: 0.03em;
	line-height: 1;
	text-transform: uppercase;
}
.dashboardCoreMeters {
	display: grid;
	gap: 2px;
}
.dashboardCoreMeterRow,
.dashboardCoreNumberRow {
	align-items: flex-end;
	display: grid;
	gap: 2px;
	grid-template-columns: repeat(var(--dashboard-core-columns), minmax(0, 1fr));
	min-width: 0;
}
.dashboardCoreMeterRow { height: 22px; }
.dashboardCoreNumberRow span {
	color: var(--dashboard-muted);
	font-size: 7px;
	line-height: 1;
	min-width: 0;
	text-align: center;
}
.dashboardCoreMeter {
	background: rgba(255, 255, 255, 0.06);
	border-radius: 1px;
	flex: 1;
	height: 100%;
	overflow: hidden;
	position: relative;
}
.dashboardCoreMeter > span {
	background: currentColor;
	border-radius: 1px;
	bottom: 0;
	height: var(--v, 4%);
	left: 0;
	opacity: 0.85;
	position: absolute;
	right: 0;
}
.dashboardDatabasePerformance {
	border-top: 1px solid var(--dashboard-border);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboardDatabasePerformance > div {
	display: flex;
	flex-direction: column;
	gap: 3px;
	justify-content: center;
	padding: 6px 12px;
}
.dashboardDatabasePerformance > div + div {
	border-left: 1px solid var(--dashboard-border);
}
.dashboardDatabasePerformance span {
	align-items: center;
	color: var(--dashboard-muted);
	display: inline-flex;
	font-size: 10px;
	gap: 6px;
}
.dashboardDatabasePerformance i {
	color: var(--dashboard-cyan);
	font-size: 11px;
	width: 12px;
}
.dashboardDatabasePerformance strong {
	font-size: 13px;
	font-weight: 500;
}
.dashboardStorage small {
	display: block;
	font-size: 10px;
	margin-left: 30px;
	margin-top: -5px;
}
.dashboardBar {
	background: #1b1b1b;
	border: 1px solid var(--dashboard-border);
	border-radius: 4px;
	height: 7px;
	overflow: hidden;
}
.dashboardBar span {
	background: linear-gradient(90deg, #0087a0, var(--dashboard-cyan)); background-color:var(--dashboard-cyan);
	display: block;
	height: 100%;
	min-width: 2px;
}
.dashboardNetworkHero {
	align-items: flex-start;
	flex-direction: column;
	gap: 2px;
	justify-content: center;
	position: relative;
}
.dashboardHeroCopy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	padding-right: 118px;
	width: 100%;
}
.dashboardHeroState {
	position: absolute;
	right: 12px;
	top: 10px;
}
.dashboardNetworkHero .dashboardHeroState {
	top: 50%;
	transform: translateY(-50%);
}
.dashboardNetworkState {
	align-items: center;
	background: rgba(49,204,75,0.1);
	border: 1px solid rgba(49,204,75,0.34);
	border-radius: 4px;
	color: var(--dashboard-green);
	display: inline-flex;
	gap: 6px;
	font-size: 10px;
	font-weight: 500;
	padding: 2px 6px;
	text-transform: none;
}
.dashboardNetworkState i {
	font-size: 6px;
	margin-right: 0;
}
.dashboardAddressMode {
	background: #353535;
	border: 1px solid #505050;
	border-radius: 4px;
	padding: 3px 7px;
}
.dashboardNetworkHero strong {
	font-size: 16px;
	font-weight: 500;
}
.dashboardNetworkAddress {
	align-items: center;
	display: inline-flex;
	gap: 8px;
}
.dashboardNetworkAddress svg {
	color: var(--dashboard-cyan);
	height: 20px;
	width: 20px;
}
.dashboardNetworkThroughput {
	border-bottom: 1px solid var(--dashboard-border);
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 10px 12px;
}
.dashboardNetworkThroughput .dashboardMetricTile {
	min-height: 128px;
	padding: 9px 10px;
}
.dashboardNetworkThroughput .dashboardTrend svg {
	max-height: 58px;
	min-height: 42px;
}
.dashboardNetworkThroughput .dashboardTrend footer {
	align-items: flex-start;
	gap: 6px;
	line-height: 1.15;
}
.dashboardNetworkThroughput .dashboardTrend footer span:last-child {
	text-align: right;
}
.dashboardNetworkThroughput .dashboardMetricTile > header strong {
	font-size: 13px;
	white-space: nowrap;
}
.dashboardNetworkBandwidth {
	border-bottom: 1px solid var(--dashboard-border);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-height: 58px;
}
.dashboardNetworkBandwidth > div {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 4px;
	justify-content: center;
	min-width: 0;
	padding: 8px 10px;
	text-align: center;
}
.dashboardNetworkBandwidth > div + div {
	border-left: 1px solid var(--dashboard-border);
}
.dashboardNetworkBandwidth span {
	align-items: center;
	color: var(--dashboard-muted);
	display: inline-flex;
	font-size: 10px;
	gap: 6px;
	white-space: nowrap;
}
.dashboardNetworkBandwidth i {
	color: var(--dashboard-cyan);
	font-size: 10px;
	width: 10px;
}
.dashboardNetworkBandwidth strong {
	color: #e8e8e8;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dashboardProductStats {
	display: flex;
	flex-direction: column;
	flex: 1;
}
.dashboardProductHero {
	align-items: center;
	background: #272727;
	border-bottom: 1px solid var(--dashboard-border);
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	gap: 10px;
	justify-content: flex-start;
	/* Fixed 74px matches the Device/Network heroes so this tile's divider — and
	   the "Nodes connected" section that follows it — lines up across the row. */
	flex: 0 0 74px;
	height: 74px;
	min-height: 74px;
	padding: 10px 12px;
	position: relative;
}
.dashboardProductHero .dashboardLicenseCopy { align-items: center; padding-right: 62px; }
.dashboardProductHero .dashboardHeroState { top: 50%; transform: translateY(-50%); }
.dashboardHeroStateIdle {
	background: rgba(255,255,255,0.05) !important;
	border-color: #4a4a4a !important;
	color: var(--dashboard-muted) !important;
}
.dashboardProductHero strong {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.05;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dashboardProductHero .dashboardHeroCopy > span:last-child {
	color: var(--dashboard-muted);
	font-size: 10px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dashboardLicenseCopy {
	align-items: flex-start;
	display: flex;
	flex-direction: row;
	gap: 8px;
	padding-right: 0;
	width: 100%;
}
.dashboardLicenseIcon {
	align-items: center;
	background: #253528;
	border: 1px solid #484b4c;
	border-radius: 6px;
	color: var(--dashboard-green);
	display: inline-flex;
	flex: 0 0 25px;
	height: 25px;
	justify-content: center;
	margin-top: 0;
	width: 25px;
}
.dashboardLicenseIcon i {
	color: currentColor;
	font-size: 12px;
}
.dashboardLicenseIconActive {
	background: rgba(49, 204, 75, 0.12);
	border-color: rgba(49, 204, 75, 0.34);
	color: var(--dashboard-green);
	box-shadow: inset 0 0 0 1px rgba(49, 204, 75, 0.06);
}
.dashboardLicenseIconWarning {
	background: rgba(233, 98, 37, 0.13);
	border-color: rgba(233, 98, 37, 0.42);
	color: var(--dashboard-orange);
	box-shadow: inset 0 0 0 1px rgba(233, 98, 37, 0.08);
}
.dashboardLicenseIconExpired {
	background: rgba(201, 0, 47, 0.13);
	border-color: rgba(201, 0, 47, 0.48);
	color: #ff5b69;
	box-shadow: inset 0 0 0 1px rgba(201, 0, 47, 0.08);
}
.dashboardLicenseBody {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	width: 100%;
}
.dashboardProductHero .dashboardLicenseBody > strong {
	max-width: 100%;
	overflow: visible;
	text-overflow: clip;
	white-space: nowrap;
	word-break: normal;
}
.dashboardLicenseTitle {
	color: var(--dashboard-muted);
	font-size: 9px;
	line-height: 1;
	margin-bottom: 0;
}
.dashboardLicenseMeta {
	display: grid;
	gap: 14px;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	margin-top: 5px;
	min-width: 0;
	max-width: 100%;
}
.dashboardLicenseMeta > span {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.dashboardLicenseMeta small {
	color: var(--dashboard-muted);
	font-size: 9px;
	line-height: 1;
}
.dashboardLicenseMeta b {
	color: #d4d6d8;
	font-size: 9px;
	font-weight: 500;
	line-height: 1.15;
	overflow: visible;
	text-overflow: clip;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: normal;
}
.dashboardLicenseState {
	align-items: center;
	align-self: flex-start;
	background: rgba(49,204,75,0.1);
	border: 1px solid rgba(49,204,75,0.34);
	border-radius: 4px;
	color: var(--dashboard-green);
	display: inline-flex;
	gap: 6px;
	font-size: 10px;
	font-weight: 500;
	padding: 2px 6px;
	text-transform: none;
}
.dashboardLicenseState i {
	font-size: 6px;
	margin-right: 0;
}
.dashboardTileProduct .dashboardProductStats {
	justify-content: flex-start;
}
.dashboardProductStats > div {
	align-items: center;
	background: rgba(255,255,255,0.018);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 58px;
	padding: 8px;
	text-align: center;
}
.dashboardProductStats span {
	color: var(--dashboard-muted);
	font-size: 10px;
	font-weight: 500;
	text-transform: none;
}
.dashboardProductStats strong {
	font-size: 22px;
	font-weight: 500;
	line-height: 1.2;
	margin-top: 4px;
}
.dashboardProductStats strong small {
	color: var(--dashboard-muted);
	font-size: 11px;
}
.dashboardProductPrimary {
	border-bottom: 1px solid var(--dashboard-border);
	border-top: 1px solid var(--dashboard-border);
	display: grid !important;
	grid-column: 1 / -1;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	padding: 10px 13px !important;
	text-align: left !important;
}
.dashboardProductPrimary strong {
	font-size: 32px;
	grid-column: 2;
	grid-row: 1 / 3;
	margin: 0 4px 0 14px;
}
.dashboardProductPrimary > small {
	color: var(--dashboard-muted);
	font-size: 9px;
	grid-column: 1;
	margin-top: 3px;
}
/* Optional product facts between the primary metric and issue pills. */
.dashboardProductFacts {
	background: transparent !important;
	border-bottom: 1px solid var(--dashboard-border);
	flex: 0 0 auto !important;
	padding: 3px 13px !important;
}
.dashboardProductFacts > div { min-height: 38px; }
.dashboardProductMetricActive { color: var(--dashboard-orange) !important; }
.dashboardProductLogs {
	align-items: stretch !important;
	background: transparent !important;
	border-bottom: 1px solid var(--dashboard-border);
	display: flex !important;
	flex-direction: column;
	gap: 10px;
	padding: 11px 13px !important;
	text-align: left !important;
}
.dashboardProductLogsHeader {
	align-items: baseline;
	display: flex;
	justify-content: space-between;
	min-width: 0;
}
.dashboardProductLogsHeader span {
	color: #d6d6d6;
	font-size: 12px;
	font-weight: 500;
}
.dashboardLogPills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.dashboardLogPill {
	align-items: center;
	background: #1e1e1e;
	border: 1px solid #404040;
	border-radius: 14px;
	color: var(--config-muted);
	display: inline-flex;
	flex: 1 0 28%;
	font-size: 11px;
	gap: 6px;
	height: 28px;
	justify-content: center;
	min-width: 0;
	padding: 0 11px;
	text-decoration: none;
	transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
a.dashboardLogPill:hover,
a.dashboardLogPill:focus {
	color: var(--config-text);
	filter: none;
	text-decoration: none;
}
a.dashboardLogPill:focus {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}
.dashboardLogPill small {
	color: inherit;
	font-size: 11px;
	font-weight: 500;
	line-height: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dashboardLogPill b {
	color: var(--config-text);
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	text-align: right;
}
.dashboardLogPill::before {
	background: currentColor;
	border-radius: 50%;
	content: "";
	display: inline-block;
	flex: 0 0 8px;
	height: 8px;
	width: 8px;
}
.dashboardLogPillFatal::before { background: #ff3b5c; }
.dashboardLogPillError::before { background: #e05b5b; }
.dashboardLogPillWarning::before { background: #e96225; }
.dashboardLogPillInfo::before { background: #5bb8d4; }
.dashboardLogPillDebug::before { background: #a78bfa; }
.dashboardCapacity {
	align-items: stretch !important;
	background: transparent !important;
	display: flex !important;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 9px;
	justify-content: center !important;
	padding: 13px 18px !important;
	text-align: left !important;
}
.dashboardCapacityHeader {
	align-items: baseline;
	display: flex;
	justify-content: space-between;
}
.dashboardCapacityHeader > span {
	color: #d6d6d6;
	font-size: 12px;
	font-weight: 500;
}
.dashboardCapacityHeader strong {
	color: #ededed;
	font-size: 18px;
	font-weight: 500;
	margin: 0;
}
.dashboardCapacityHeader strong > span {
	color: #ededed;
	font-size: 18px;
}
.dashboardCapacityHeader strong small {
	font-size: 11px;
	font-weight: 400;
	margin: 0 2px;
}
.dashboardCapacityBar {
	background: #1d1d1d;
	border: 1px solid #484848;
	border-radius: 4px;
	height: 9px;
	overflow: hidden;
	width: 100%;
}
.dashboardCapacityBar > span {
	background: linear-gradient(90deg, #008ba5 0%, var(--dashboard-cyan) 100%); background-color:var(--dashboard-cyan);
	display: block;
	height: 100%;
	min-width: 2px;
}
.dashboardCapacityLegend {
	display: grid;
	gap: 6px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dashboardCapacityLegend > span {
	background: #252525;
	border: 1px solid #444;
	border-radius: 5px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-height: 48px;
	padding: 7px 8px;
}
.dashboardCapacityLegend small {
	color: var(--dashboard-muted);
	font-size: 9px;
	font-weight: 400;
	white-space: nowrap;
}
.dashboardCapacityLegend strong {
	color: #e8e8e8;
	font-size: 17px;
	font-weight: 500;
	line-height: 1;
	margin: 0;
}
.dashboardCornerStatus,
.dashboardCornerCog {
	align-items: center;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	bottom: 0;
	box-shadow: -2px -2px 7px rgba(0, 0, 0, 0.2);
	display: flex;
	font-size: 14px;
	height: 34px;
	justify-content: center;
	position: absolute;
	width: 44px;
	z-index: 2;
}
.dashboardCornerStatus {
	background: linear-gradient(180deg, #18d2f2 0%, #00a9c8 100%); background-color:#00a9c8;
	border-right: 1px solid rgba(0, 0, 0, 0.35);
	border-top-right-radius: 18px;
	color: #142124;
	left: 0;
}
.dashboardCornerNodes {
	background: linear-gradient(180deg, #f16b2f 0%, #df5515 100%); background-color:#f16b2f;
	color: #1d1d1d;
}
.dashboardCornerStatus svg {
	fill: none;
	height: 15px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 15px;
}
.dashboardCornerCog {
	background: linear-gradient(180deg, #f16b2f 0%, #df5515 100%); background-color:#f16b2f;
	border-left: 1px solid rgba(0, 0, 0, 0.35);
	border-top-left-radius: 18px;
	color: #1d1d1d;
	right: 0;
}
.dashboardCornerStatus:hover {
	background: linear-gradient(180deg, #28ddfb 0%, #08b6d7 100%); background-color:#08b6d7;
	color: #101c1f;
}
.dashboardCornerNodes:hover {
	background: linear-gradient(180deg, #ff7437 0%, #e85c1c 100%); background-color:#e85c1c;
	color: #111;
}
.dashboardCornerCog:hover {
	background: linear-gradient(180deg, #ff7437 0%, #e85c1c 100%); background-color:#e85c1c;
	color: #111;
}
@media only screen and (max-width: 1180px) {
	.dashboardTiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		min-height: auto;
	}
	.dashboardTile {
		min-height: 340px;
	}
}
@media only screen and (max-width: 650px) {
	.dashboardTiles {
		grid-template-columns: 1fr;
	}
	.dashboardTile {
		min-height: 320px;
	}
	.dashboardTrend svg {
		height: 86px;
		max-height: 110px;
	}
}


/* ==========================================================================
   Shell integration (kept separate from the dashboard composition above)
   ========================================================================== */

/* The dashboard's log pills / stat text reference --config-* tokens that are
   defined in the config/overview scope. Provide them here so those colours
   resolve identically when the dashboard loads without that module. */
.dashboardPage {
  --config-text: #d6d8da;
  --config-muted: #a0a0a0;
  --config-surface: #2c2c2c;
  --config-surface-raised: #353535;
  --config-border: #484848;
  --config-cyan: #00c7ee;
  --config-orange: #e96225;
  --config-red: #e05b5b;
  --config-green: #31cc4b;
}

/* Stop the global .sp-app base rules (smartpi-ui.css) leaking into the
   self-contained dashboard: tile-header titles must be DARK on the orange, and
   footer links GREY — not the app's light heading / orange link colours. */
.dashboardTileHeader h3 { color: #202020; }
.dashboardPage a { color: inherit; }
.dashboardPage .dashboardTileLink { color: #c9c9c9; }
.dashboardPage .dashboardTileLink:hover { color: #fff; }

/* Font Awesome <i> icons in place of inline SVGs. */
.dashboardTileIcon i { font-size: 16px; line-height: 1; color: #f1f3f4; }
.dashboardMetricIcon i { font-size: 15px; line-height: 1; }
.dashboardDeviceIcon i { font-size: 24px; line-height: 1; }
.dashboardTileLink i { font-size: 13px; }
/* Solid green status dot (drawn in CSS so it can't fall back to a grey glyph). */
.dashboardNetworkState i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dashboard-green); display: inline-block; font-size: 0;
}
.dashboardNetworkAddress i { color: var(--dashboard-cyan); font-size: 15px; }
.dashboardSectionLabel i, .dashboardStorageLabel i { color: var(--dashboard-cyan); font-size: 12px; }

/* The dashboard fills the content well edge-to-edge on the dark base, so the
   inter-tile gaps read as #212121 (not the #333 well).

   height:auto lets the well wrap the dashboard instead of running to the bottom
   of the viewport, so the padding below the update line matches the padding
   above the tiles. The inherited max-height still caps it, so a dashboard
   taller than the frame scrolls inside the well as before. */
.sp-content__well:has(.dashboardPage) {
  background: var(--sp-well);
  height: auto;
  position: relative;
}
.sp-content__well:has(.dashboardPage) .dashboardPage {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.sp-content__well:has(.dashboardPage) .dashboardHost {
  display: flex;
  min-height: 0;
}
.sp-content__well:has(.dashboardPage) .dashboardHost > .dashboardPage {
  flex: 1 1 auto;
}
/* The tiles size to their content: they neither stretch to fill a tall screen
   nor compress on a short one. Growing left large voids inside Device, Network
   and Product on a tall viewport, and shrinking pushed the Performance trend
   cards over one another on a short one. The page above still fills the well,
   so the update line keeps its place at the bottom, and the well scrolls when
   the tiles need more room than it has. */
.sp-content__well:has(.dashboardPage) .dashboardTiles {
  order: 1;
  flex: 0 0 auto;
  min-height: 480px;
}
/* The update line follows the tiles rather than being pinned to the bottom of
   the well. Now that the tiles size to their content, pinning it left it
   stranded in empty space on a tall screen. */
.sp-content__well:has(.dashboardPage) .dashboardPageStatus {
  order: 2;
  position: static;
  flex: 0 0 28px;
  justify-content: flex-end;
  padding-top: 8px;
}

/* Phone composition -------------------------------------------------------
   Keep the desktop dashboard grammar, but let each tile size to its content
   and give the live charts the full available width. This avoids treating a
   phone as a four-column dashboard squeezed into one narrow column. */
@media only screen and (max-width: 767px) {
  .sp-content__well:has(.dashboardPage) .dashboardPage,
  .sp-content__well:has(.dashboardPage) .dashboardHost {
    height: auto;
    min-height: 0;
  }

  .sp-content__well:has(.dashboardPage) .dashboardPageStatus {
    align-self: stretch;
    flex: 0 0 auto;
    justify-content: flex-start;
    order: 0;
    padding: 0 2px 8px;
  }

  .sp-content__well:has(.dashboardPage) .dashboardTiles {
    flex: 0 0 auto;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    order: 1;
  }

  .dashboardTile {
    border-radius: 8px;
    min-height: 0;
  }

  .dashboardTileHeader {
    min-height: 42px;
    padding: 5px 8px;
  }

  .dashboardDeviceHero,
  .dashboardNetworkHero,
  .dashboardProductHero,
  .dashboardPerformanceHero {
    flex-basis: auto;
    height: auto;
    min-height: 58px;
    padding: 7px 10px;
  }

  .dashboardDeviceIcon {
    height: 38px;
    width: 38px;
  }

  .dashboardDeviceIcon svg {
    height: 22px;
    width: 22px;
  }

  .dashboardDeviceHero strong,
  .dashboardNetworkAddress,
  .dashboardProductHero .dashboardLicenseBody > strong {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .dashboardDataList {
    flex: 0 0 auto;
    padding-block: 2px;
  }

  .dashboardDataList > div {
    min-height: 33px;
    padding-block: 4px;
  }

  .dashboardTileFooterEmpty {
    display: none;
  }

  .dashboardPerformanceGrid {
    flex: 0 0 auto;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    padding: 8px;
  }

  .dashboardMetricTile {
    padding: 8px 9px;
  }

  .dashboardPerformanceGrid > .dashboardTrend {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    min-height: 112px;
  }

  .dashboardPerformanceGrid > .dashboardTrend + .dashboardTrend,
  .dashboardNetworkThroughput > .dashboardTrend + .dashboardTrend {
    border-left: 1px solid #444;
  }

  .dashboardTrend svg {
    height: 50px;
    max-height: 50px;
    min-height: 50px;
  }

  .dashboardCpuGraph {
		height: auto;
  }

  .dashboardNetworkThroughput {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  .dashboardNetworkThroughput .dashboardMetricTile {
    grid-template-columns: minmax(0, 1fr);
    min-height: 112px;
  }

  .dashboardNetworkThroughput .dashboardTrend svg {
    height: 46px;
    max-height: 46px;
    min-height: 46px;
  }

  .dashboardProductStats {
    flex: 0 0 auto;
  }

  .dashboardProductLogs {
    gap: 8px;
    padding: 9px 11px 10px !important;
  }

  .dashboardProductStats > div {
    min-height: 50px;
    padding: 6px 8px;
  }

  .dashboardProductPrimary {
    padding: 8px 11px !important;
  }

  .dashboardProductPrimary strong {
    font-size: 26px;
    margin-left: 10px;
  }

  .dashboardProductFacts > div {
    min-height: 33px;
  }

  .dashboardLogPill {
    flex: 1 1 calc(50% - 3px);
    height: 26px;
  }
}
