/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, sans-serif;
  background: #0f1117;
  color: #e8eaf0;
  min-height: 100vh;
  padding: 2rem 1.5rem;
}

/* ── Header ───────────────────────────────────────────────── */
header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  margin-top: 0.25rem;
  color: #8b8fa8;
  font-size: 0.9rem;
}

.last-updated {
  margin-top: 0.4rem;
  color: #8b8fa8;
  font-size: 0.8rem;
}

.back-link {
  position: absolute;
  left: 0;
  top: 0.4rem;
  color: #8b8fa8;
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: #e8eaf0;
}

/* ── Status rows ──────────────────────────────────────────── */
.status {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.status-row {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.status-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8b8fa8;
  margin-bottom: 0.4rem;
}

.status-right {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.status-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #a8d8a8;
}

.status-unit {
  font-size: 1rem;
  color: #8b8fa8;
}

/* ── Moisture progress bar ────────────────────────────────── */
.progress-track {
  position: relative;
  margin-top: 0.75rem;
  height: 6px;
  background: #2a2d3a;
  border-radius: 3px;
  overflow: hidden;
}

.range-zone {
  position: absolute;
  left: 38%;
  width: 37%; /* 75% - 38% */
  height: 100%;
  background: rgba(168, 216, 168, 0.15);
  border-left: 1px solid #a8d8a8;
  border-right: 1px solid #a8d8a8;
}

.progress-fill {
  position: absolute;
  height: 100%;
  background: #a8d8a8;
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

.range-labels {
  position: relative;
  height: 1rem;
  margin-top: 0.25rem;
}

.range-labels span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: #8b8fa8;
}

.moisture-low {
  color: #e07070;
  background: #2a2d3a;
}

.progress-fill.moisture-low {
  background: #e07070;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  color: #a8d8a8;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn:hover {
  background: #2a2d3a;
}

/* ── Charts ───────────────────────────────────────────────── */
.charts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.chart-box {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  padding: 1.5rem;
}

.chart-box h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #8b8fa8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
