/* ============================================================
   SECTION: dashboard summary layout
============================================================ */

.tpmo-summary-dashboard {
	display: grid;
	grid-template-columns: repeat(3, minmax(260px, 1fr));
	gap: 24px;
	align-items: stretch;
}

.tpmo-summary-dashboard .summary-panel {
	background: #ffffff;
	border: 1px solid #d9d9d9;
	border-radius: 18px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
	padding: 24px;
}

.tpmo-summary-dashboard .summary-panel.summary-panel-wide {
	grid-column: 1 / -1;
}

.tpmo-summary-dashboard .summary-row {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 150px;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tpmo-summary-dashboard .summary-row:hover,
.tpmo-summary-dashboard .summary-row:focus {
	transform: translateY(2px);
	outline: none;
}

.tpmo-summary-dashboard .summary-icon {
	flex: 0 0 96px;
	width: 96px;
	height: 96px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.tpmo-summary-dashboard .summary-text {
	flex: 1 1 auto;
}

.tpmo-summary-dashboard .summary-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tpmo-summary-dashboard .summary-list li {
	margin: 0 0 10px 0;
	font-size: 1.05rem;
	color: var(--primary-color);
}

.tpmo-summary-dashboard .summary-list li:last-child {
	margin-bottom: 0;
}

/* ============================================================
   SECTION: strains dashboard block
============================================================ */

.tpmo-summary-dashboard .strains-summary-row {
	align-items: flex-start;
	min-height: auto;
}

.tpmo-summary-dashboard .strains-header {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 24px;
	align-items: center;
	margin-bottom: 24px;
}

.tpmo-summary-dashboard .strains-header-icon {
	width: 96px;
	height: 96px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: var(--icon-strains);
}

.tpmo-summary-dashboard .strains-top {
	display: grid;
	grid-template-columns: repeat(2, minmax(220px, 1fr));
	gap: 24px;
}

.tpmo-summary-dashboard .strains-top.strains-top--dual {
	grid-template-columns: repeat(2, minmax(320px, 1fr));
	align-items: start;
}

.tpmo-summary-dashboard .strains-summary-column {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.tpmo-summary-dashboard .strains-stat-card {
	border: 2px solid var(--primary-color);
	border-radius: 28px;
	padding: 18px 24px;
	background: #ffffff;
}

.tpmo-summary-dashboard .strains-stat-value {
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1;
	color: var(--primary-color);
	margin-bottom: 8px;
}

.tpmo-summary-dashboard .strains-stat-label {
	font-size: 0.9rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--primary-color);
	opacity: 0.85;
}

.tpmo-summary-dashboard .strains-middle {
	display: grid;
	grid-template-columns: repeat(2, minmax(320px, 1fr));
	gap: 24px;
	align-items: start;
}

.tpmo-summary-dashboard .strains-chart-card {
	border: 1px solid #d9d9d9;
	border-radius: 18px;
	padding: 18px;
	background: #ffffff;
}

.tpmo-summary-dashboard .strains-chart-title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--primary-color);
	margin: 0 0 14px 0;
}

.tpmo-summary-dashboard .strains-chart-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.tpmo-summary-dashboard .strains-donut {
	width: 210px;
	height: 210px;
	border-radius: 50%;
	position: relative;
	background: #e8ecec;
	border: 1px solid #d0d7d7;
}

.tpmo-summary-dashboard .strains-donut::after {
	content: '';
	position: absolute;
	inset: 34px;
	background: #ffffff;
	border-radius: 50%;
	z-index: 1;
}

.tpmo-summary-dashboard .strains-donut-center {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--primary-color);
	text-align: center;
	padding: 0 18px;
}

.tpmo-summary-dashboard .strains-donut-center-value {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 6px;
}

.tpmo-summary-dashboard .strains-donut-center-label {
	font-size: 0.8rem;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.85;
}

.tpmo-summary-dashboard .strains-legend {
	width: 100%;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tpmo-summary-dashboard .strains-legend.strains-legend--full {
	width: 100%;
}

.tpmo-summary-dashboard .strains-legend li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	color: var(--primary-color);
	font-size: 0.95rem;
}

.tpmo-summary-dashboard .strains-legend li:last-child {
	margin-bottom: 0;
}

.tpmo-summary-dashboard .strains-legend-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.tpmo-summary-dashboard .strains-legend-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex: 0 0 14px;
	border: 1px solid rgba(0, 0, 0, 0.12);
}

.tpmo-summary-dashboard .strains-legend-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
}

.tpmo-summary-dashboard .strains-legend-icon .tpmo {
	transform: scale(0.42);
	transform-origin: center center;
}

.tpmo-summary-dashboard .strains-legend-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tpmo-summary-dashboard .strains-legend-value {
	font-weight: 600;
	white-space: nowrap;
}

/* ============================================================
   SECTION: microorganism type cards
============================================================ */

.tpmo-summary-dashboard .strains-groups {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tpmo-summary-dashboard .strains-groups.strains-groups-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin-top: 24px;
}

.tpmo-summary-dashboard .strains-group-card {
	display: flex;
	align-items: center;
	gap: 16px;
	border: 1px solid #cfcfcf;
	border-radius: 18px;
	background: #ffffff;
	padding: 16px 18px;
}

.tpmo-summary-dashboard .strains-group-card.strains-group-card--compact {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	min-height: 110px;
}

.tpmo-summary-dashboard .strains-group-card-header {
	display: flex;
	align-items: center;
	gap: 14px;
	width: auto;
	min-width: 220px;
	flex: 1 1 auto;
}

.tpmo-summary-dashboard .strains-group-icon {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border: 2px solid var(--primary-color);
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8fbfb;
}

.tpmo-summary-dashboard .strains-group-icon .tpmo {
	transform: scale(0.95);
	transform-origin: center center;
}

.tpmo-summary-dashboard .strains-group-content {
	flex: 1 1 auto;
}

.tpmo-summary-dashboard .strains-group-title-wrap {
	min-width: 0;
	flex: 1 1 auto;
}

.tpmo-summary-dashboard .strains-group-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: normal;
	color: var(--primary-color);
}

.tpmo-summary-dashboard .strains-group-metrics {
	display: flex;
	align-items: center;
	gap: 32px;
	flex-wrap: nowrap;
	margin-left: auto;
}

.tpmo-summary-dashboard .strains-group-metric {
	min-width: 90px;
}

.tpmo-summary-dashboard .strains-group-metric-value {
	display: block;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--primary-color);
}

.tpmo-summary-dashboard .strains-group-metric-label {
	display: block;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--primary-color);
	opacity: 0.85;
}

/* ============================================================
   SECTION: loading / error
============================================================ */

.tpmo-summary-dashboard .dashboard-loading,
.tpmo-summary-dashboard .dashboard-error {
	grid-column: 1 / -1;
	background: #ffffff;
	border: 1px solid #d9d9d9;
	border-radius: 18px;
	padding: 24px;
	color: var(--primary-color);
	font-size: 1.05rem;
}

/* ============================================================
   SECTION: responsive
============================================================ */

@media (max-width: 1100px) {
	.tpmo-summary-dashboard {
		grid-template-columns: 1fr;
	}

	.tpmo-summary-dashboard .summary-panel.summary-panel-wide {
		grid-column: auto;
	}

	.tpmo-summary-dashboard .strains-header {
		grid-template-columns: 1fr;
	}

	.tpmo-summary-dashboard .strains-top.strains-top--dual {
		grid-template-columns: 1fr;
	}

	.tpmo-summary-dashboard .strains-middle {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 900px) {
	.tpmo-summary-dashboard .strains-group-card.strains-group-card--compact {
		flex-direction: column;
		align-items: flex-start;
		min-height: auto;
	}

	.tpmo-summary-dashboard .strains-group-card-header {
		min-width: 0;
		width: 100%;
	}

	.tpmo-summary-dashboard .strains-group-metrics {
		margin-left: 0;
		flex-wrap: wrap;
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.tpmo-summary-dashboard .summary-row {
		flex-direction: column;
		align-items: flex-start;
		min-height: auto;
	}

	.tpmo-summary-dashboard .summary-icon {
		width: 84px;
		height: 84px;
		flex-basis: 84px;
	}

	.tpmo-summary-dashboard .strains-top {
		grid-template-columns: 1fr;
	}

	.tpmo-summary-dashboard .strains-header-icon {
		width: 84px;
		height: 84px;
	}

	.tpmo-summary-dashboard .strains-stat-card {
		padding: 18px 20px;
	}

	.tpmo-summary-dashboard .strains-stat-value {
		font-size: 2.2rem;
	}

	.tpmo-summary-dashboard .strains-donut {
		width: 190px;
		height: 190px;
	}

	.tpmo-summary-dashboard .strains-donut::after {
		inset: 30px;
	}
}