/* Eden Agri Farms — Sensor Dashboard
   Brand: forest green #1B3A2E, mint #5FA88A, gold #9C7A2E, cream #FBF9F4
   Fonts: Playfair Display (display), Inter (body), IBM Plex Mono (data/numbers) */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

.eden-sensors-root {
	--eden-forest: #1B3A2E;
	--eden-mint: #5FA88A;
	--eden-gold: #9C7A2E;
	--eden-cream: #FBF9F4;
	--eden-red: #B5473F;
	--eden-amber: #C68A2E;

	font-family: 'Inter', -apple-system, sans-serif;
	background: var(--eden-cream);
	color: var(--eden-forest);
	padding: 28px;
	border-radius: 14px;
	max-width: 1200px;
	margin: 0 auto;
}

.eden-sensors-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 24px;
	border-bottom: 2px solid rgba(27, 58, 46, 0.12);
	padding-bottom: 16px;
}

.eden-sensors-header h2 {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: 26px;
	margin: 0;
	color: var(--eden-forest);
}

.eden-sensors-status {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 13px;
	color: var(--eden-forest);
	opacity: 0.85;
}

.eden-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--eden-mint);
	display: inline-block;
}
.eden-dot-live { animation: eden-pulse 2s infinite; }
.eden-dot-off { background: var(--eden-red); animation: none; }

@keyframes eden-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(95, 168, 138, 0.5); }
	70%  { box-shadow: 0 0 0 7px rgba(95, 168, 138, 0); }
	100% { box-shadow: 0 0 0 0 rgba(95, 168, 138, 0); }
}

.eden-updated { opacity: 0.6; margin-left: 6px; }

/* Stat cards */
.eden-stat-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin-bottom: 24px;
}

.eden-stat-card {
	background: #fff;
	border: 1px solid rgba(27, 58, 46, 0.10);
	border-radius: 12px;
	padding: 16px 18px;
	box-shadow: 0 1px 3px rgba(27, 58, 46, 0.06);
}

.eden-stat-card .eden-stat-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--eden-forest);
	opacity: 0.6;
	margin-bottom: 6px;
}

.eden-stat-card .eden-stat-value {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 26px;
	font-weight: 600;
	color: var(--eden-forest);
}

.eden-stat-card .eden-stat-value.eden-warn { color: var(--eden-red); }
.eden-stat-card .eden-stat-unit { font-size: 14px; opacity: 0.6; margin-left: 3px; }

/* Alerts */
.eden-alerts {
	background: #fdf2f0;
	border: 1px solid rgba(181, 71, 63, 0.3);
	border-radius: 12px;
	padding: 14px 18px;
	margin-bottom: 24px;
}
.eden-alerts h3 { margin: 0 0 8px; font-size: 15px; color: var(--eden-red); font-family: 'Inter'; }
.eden-alerts ul { margin: 0; padding-left: 18px; }
.eden-alerts li { font-family: 'IBM Plex Mono', monospace; font-size: 13px; margin-bottom: 4px; }

/* Plot grid */
.eden-grid-wrap h3 {
	font-family: 'Playfair Display', serif;
	font-size: 18px;
	margin: 0 0 14px;
	color: var(--eden-forest);
}

.eden-plot-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
}

.eden-plot-cell {
	background: #fff;
	border-radius: 10px;
	padding: 14px 10px;
	text-align: center;
	cursor: pointer;
	border: 2px solid transparent;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
	box-shadow: 0 1px 3px rgba(27, 58, 46, 0.06);
}
.eden-plot-cell:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(27, 58, 46, 0.12); }

.eden-plot-cell .eden-plot-id {
	font-family: 'IBM Plex Mono', monospace;
	font-weight: 600;
	font-size: 15px;
	color: var(--eden-forest);
}

.eden-plot-cell .eden-plot-metric {
	font-size: 11px;
	opacity: 0.65;
	margin-top: 4px;
}

.eden-status-ok      { border-color: var(--eden-mint); background: rgba(95, 168, 138, 0.08); }
.eden-status-alert   { border-color: var(--eden-red); background: rgba(181, 71, 63, 0.08); }
.eden-status-offline { border-color: var(--eden-amber); background: rgba(198, 138, 46, 0.08); }
.eden-status-no_data { border-color: rgba(27, 58, 46, 0.15); background: rgba(27, 58, 46, 0.03); }

.eden-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 14px;
	font-size: 12px;
	opacity: 0.8;
}
.eden-legend span { display: flex; align-items: center; gap: 6px; }
.eden-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 2px solid; }
.eden-swatch.eden-status-ok { border-color: var(--eden-mint); }
.eden-swatch.eden-status-alert { border-color: var(--eden-red); }
.eden-swatch.eden-status-offline { border-color: var(--eden-amber); }
.eden-swatch.eden-status-no_data { border-color: rgba(27, 58, 46, 0.3); }

/* Modal */
.eden-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(27, 58, 46, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 20px;
}
.eden-modal {
	background: var(--eden-cream);
	border-radius: 14px;
	padding: 24px 26px;
	max-width: 520px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 12px 36px rgba(27, 58, 46, 0.3);
	font-family: 'Inter', sans-serif;
	color: var(--eden-forest);
}
.eden-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: var(--eden-forest);
	opacity: 0.6;
}
.eden-modal-close:hover { opacity: 1; }
.eden-modal h3 { font-family: 'Playfair Display', serif; margin: 0 0 14px; font-size: 20px; }
.eden-modal-sensor { margin-bottom: 16px; }
.eden-modal-sensor .eden-modal-sensor-head {
	display: flex;
	justify-content: space-between;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 13px;
	margin-bottom: 6px;
}
.eden-modal-sensor svg { width: 100%; height: 46px; display: block; }

/* Responsive */
@media (max-width: 680px) {
	.eden-plot-grid { grid-template-columns: repeat(3, 1fr); }
	.eden-sensors-header { flex-direction: column; align-items: flex-start; }
}

/* Admin page reuse */
.eden-admin .widefat code { font-size: 11px; }
