.agro-page { background: #eef3ee; color: #142018; }
.agro-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(11,38,22,.55) 0%, rgba(11,38,22,.8) 100%),
    url('https://images.pexels.com/photos/1072179/pexels-photo-1072179.jpeg?auto=compress&cs=tinysrgb&w=1920&h=600&fit=crop') center / cover no-repeat;
  color: #fff;
  padding: 76px 0 42px;
}
.agro-hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.agro-hero p { max-width: 540px; margin: 0; font-size: 1rem; line-height: 1.55; color: rgba(255,255,255,.85); }
@media (max-width: 900px) {
  .agro-hero { min-height: 270px; }
}
@media (max-width: 768px) {
  .agro-hero { min-height: 240px; padding-top: 64px; }
  .agro-hero h1 { font-size: 1.65rem; }
  .agro-hero p { font-size: 0.92rem; }
}
.agro-section { padding: 1.4rem 0 3.2rem; }
.agro-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1rem;
  align-items: stretch;
}
.agro-panel {
  background: #fff;
  border-radius: 22px;
  padding: 1.15rem 1.15rem 1rem;
  box-shadow: 0 16px 40px rgba(13, 61, 31, .08);
}
.agro-panel-kicker {
  margin: 0;
  color: #1b6b3a;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.agro-panel h2 { margin: .2rem 0 .85rem; font-size: 1.45rem; color: #0d3d1f; letter-spacing: -.02em; }
.agro-panel label, .agro-coords label {
  display: flex;
  flex-direction: column;
  gap: .32rem;
  font-size: .78rem;
  font-weight: 800;
  color: #14532d;
  margin-bottom: .7rem;
}
.agro-panel input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: #0f172a;
  border: 1px solid #d5e0d6;
  border-radius: 12px;
  padding: .78rem .85rem;
  background: #f7faf7;
}
.agro-panel input:focus { outline: 2px solid #1b6b3a; border-color: transparent; background: #fff; }
.agro-coords { display: grid; grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr); gap: .5rem; }
.agro-coords label { min-width: 0; margin-bottom: .2rem; }
.agro-coords input { padding-left: .6rem; padding-right: .55rem; }
.agro-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.agro-btn, .agro-btn--ghost {
  border: 0;
  border-radius: 12px;
  padding: .78rem 1rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.agro-btn { background: #1b6b3a; color: #fff; }
.agro-btn:hover { background: #155729; }
.agro-btn:disabled { opacity: .65; cursor: wait; }
.agro-btn--ghost { background: #eff8f1; color: #14532d; }
.agro-btn--ghost:hover { background: #d6efd8; }
.agro-hint, .agro-place-note { margin: .75rem 0 0; color: #5f6f64; font-size: .84rem; line-height: 1.45; }
.agro-place-note { margin-top: -.2rem; color: #14532d; font-weight: 700; }
.agro-map {
  min-height: 540px;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #d5e2d4;
  box-shadow: 0 16px 40px rgba(13, 61, 31, .1);
  cursor: crosshair;
  isolation: isolate;
  z-index: 0;
}
.agro-map.leaflet-container { cursor: crosshair; font: inherit; }
.agro-status { margin-top: 1rem; padding: .85rem 1rem; border-radius: 14px; background: #fff; color: #14532d; box-shadow: 0 8px 24px rgba(13, 61, 31, .06); }
.agro-status.is-error { background: #fef2f2; color: #991b1b; }
.agro-out { margin-top: 1.1rem; display: grid; gap: 1rem; }

.agro-banner {
  background: linear-gradient(160deg, #0d3d1f, #1b6b3a);
  color: #fff;
  border-radius: 22px;
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: 0 18px 40px rgba(13, 61, 31, .16);
}
.agro-banner-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.agro-kicker { margin: 0; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; font-weight: 800; color: rgba(255,255,255,.75); }
.agro-banner h2 { margin: .15rem 0 .2rem; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.03em; }
.agro-banner .agro-corrected { margin: 0; color: #fde68a; font-weight: 700; }
.agro-tools { display: flex; flex-wrap: wrap; gap: .45rem; }
.agro-tools button {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 999px;
  padding: .55rem .9rem;
  font: inherit;
  font-weight: 800;
  font-size: .86rem;
  cursor: pointer;
}
.agro-tools button:hover, .agro-tools button.is-on { background: #fff; color: #0d3d1f; }
.agro-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .7rem;
  margin-top: 1rem;
}
.agro-metric {
  background: rgba(255,255,255,.1);
  border-radius: 16px;
  padding: .75rem .8rem .85rem;
  min-width: 0;
}
.agro-metric span { display: block; font-size: .75rem; color: rgba(255,255,255,.78); font-weight: 700; }
.agro-metric strong { display: block; margin-top: .15rem; font-size: clamp(1.35rem, 2vw, 1.85rem); letter-spacing: -.03em; line-height: 1.1; }
.agro-metric em { display: block; margin-top: .25rem; font-style: normal; font-size: .78rem; color: rgba(255,255,255,.88); }
.agro-metric.is-dry { background: rgba(180, 83, 9, .45); }
.agro-metric.is-good { background: rgba(255,255,255,.18); }

.agro-subkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.agro-kpi { background: #fff; border-radius: 16px; padding: .8rem .85rem; box-shadow: 0 8px 24px rgba(13, 61, 31, .05); }
.agro-kpi span { display: block; color: #5f6f64; font-size: .75rem; font-weight: 700; }
.agro-kpi strong { display: block; margin-top: .15rem; font-size: 1.2rem; color: #0d3d1f; letter-spacing: -.02em; }

.agro-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1rem; }
.agro-card { background: #fff; border-radius: 22px; padding: 1.05rem 1.1rem 1.15rem; box-shadow: 0 12px 32px rgba(13, 61, 31, .06); }
.agro-card h2 { margin: 0 0 .7rem; font-size: 1.2rem; color: #0d3d1f; }
.agro-card h3 { margin: 1rem 0 .35rem; font-size: .95rem; color: #14532d; }
.agro-reading { margin: 0 0 .8rem; font-weight: 700; color: #14532d; }
.agro-images { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.agro-images figure { margin: 0; }
.agro-images img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: #e5eee6; display: block; }
.agro-images figcaption { font-size: .78rem; color: #4b5c50; margin-top: .35rem; line-height: 1.35; }
.agro-legend { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin-top: .7rem; font-size: .75rem; color: #4b5c50; }
.agro-swatch { display: inline-block; width: .75rem; height: .75rem; border-radius: 2px; margin-right: .25rem; vertical-align: -1px; }
.agro-table { width: 100%; border-collapse: collapse; font-size: .84rem; margin-top: .35rem; }
.agro-table th, .agro-table td { text-align: left; padding: .42rem .3rem; border-bottom: 1px solid #e6eee7; }
.agro-table th { color: #5f6f64; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.agro-table td:nth-child(n+3) { font-variant-numeric: tabular-nums; font-weight: 700; color: #0d3d1f; }
.agro-warn { background: #fffbeb; color: #92400e; border-radius: 12px; padding: .65rem .8rem; font-size: .88rem; margin: .6rem 0 0; }
.agro-error { background: #fef2f2; color: #991b1b; border-radius: 12px; padding: .7rem .8rem; }

.agro-charts { display: grid; gap: .8rem; }
.agro-charts[hidden],
.agro-out[hidden],
.agro-status[hidden],
.agro-place-note[hidden] { display: none !important; }
.agro-charts svg, .agro-graph svg { width: 100%; height: auto; display: block; }
.agro-charts h3 { margin: 0 0 .2rem; font-size: .95rem; color: #0d3d1f; }
.agro-graph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.agro-graph {
  margin: 0;
  min-width: 0;
  background: #f7faf7;
  border-radius: 16px;
  padding: .75rem .8rem .6rem;
}
.agro-graph h3 { margin: 0; font-size: .95rem; color: #0d3d1f; }
.agro-graph figcaption p { margin: .15rem 0 .4rem; color: #5f6f64; font-size: .78rem; line-height: 1.35; }
.agro-graph-legend { display: flex; flex-wrap: wrap; gap: .35rem .75rem; margin: 0 0 .35rem; }
.agro-graph-legend span { display: inline-flex; align-items: center; gap: .35rem; color: #14532d; font-size: .75rem; font-weight: 700; }
.agro-graph-legend i { width: .7rem; height: .7rem; border-radius: 2px; display: inline-block; }

.agro-plant {
  background: linear-gradient(180deg, #f4fbf5 0%, #fff 7.5rem);
  border: 3px solid #1b6b3a;
  border-radius: 22px;
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: 0 18px 40px rgba(13, 61, 31, .14);
}
.agro-plant h2 {
  margin: 0 0 .2rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: #0d3d1f;
  letter-spacing: -.02em;
}
.agro-plant-lead { margin: 0 0 .9rem; color: #14532d; font-weight: 700; }
.agro-plant-text { margin: 1rem 0 0; line-height: 1.55; color: #1c2b22; }
.agro-plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: .7rem;
}
.agro-plant-card {
  background: #fff;
  border: 1px solid #cfe3d4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(13, 61, 31, .05);
}
.agro-plant-card img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  display: block;
  background: #e5eee6;
}
.agro-plant-card h3 { margin: .55rem .7rem .15rem; font-size: .98rem; color: #0d3d1f; }
.agro-plant-card p { margin: 0 .7rem .7rem; font-size: .78rem; line-height: 1.35; color: #3d5244; }

.agro-advice { padding-bottom: 1.2rem; }
.agro-advice h3 { margin: 1rem 0 .3rem; font-size: 1rem; color: #0d3d1f; }
.agro-advice h3::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .45rem; border-radius: 50%; background: #1b6b3a; vertical-align: .08rem; }
.agro-advice p { margin: 0; line-height: 1.55; color: #1c2b22; }
.agro-disclaimer { margin-top: 1rem !important; color: #5f6f64 !important; font-size: .82rem; }
.agro-wait {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(13, 40, 24, .48);
}
.agro-wait[hidden] { display: none !important; }
body.agro-wait-on { overflow: hidden; }
.agro-wait-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 1.45rem 1.35rem 1.4rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(13, 61, 31, .28);
}
.agro-wait-spin {
  width: 48px;
  height: 48px;
  margin: 0 auto .9rem;
  border-radius: 50%;
  border: 3px solid #d7eadc;
  border-top-color: #1b6b3a;
  animation: agro-spin .75s linear infinite;
}
@keyframes agro-spin { to { transform: rotate(360deg); } }
.agro-wait-card h2 { margin: 0 0 .45rem; font-size: 1.25rem; color: #0d3d1f; }
.agro-wait-card p { margin: 0; color: #3d5244; line-height: 1.5; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) {
  .agro-wait-spin { animation: none; border-top-color: #1b6b3a; border-right-color: #1b6b3a; }
}

.leaflet-tooltip.agro-pin {
  background: #0d3d1f;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(13, 61, 31, .25);
}
.leaflet-tooltip.agro-pin.leaflet-tooltip-top::before { border-top-color: #0d3d1f; }

@media (max-width: 980px) {
  .agro-workspace, .agro-split, .agro-metrics, .agro-images, .agro-graph-grid { grid-template-columns: 1fr; }
  .agro-plant-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .agro-map { min-height: 420px; }
  .agro-metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .agro-map { min-height: 320px; }
  .agro-metrics { grid-template-columns: 1fr 1fr; }
  .agro-actions .agro-btn { flex: 1; }
}
