.lm-app {
  --lm-accent: #15803d;
  --lm-bg: #f0fdf4;
  --lm-card: #fff;
  --lm-border: #e2e8f0;
  --lm-text: #0f172a;
  --lm-muted: #64748b;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  color: var(--lm-text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.lm-hero h1 { font-size: 1.75rem; font-weight: 700; margin: 0.25rem 0 0.5rem; }
.lm-hero p { color: var(--lm-muted); margin: 0; max-width: 46rem; line-height: 1.5; }
.lm-breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin-bottom: 1rem; }
.lm-breadcrumb a { color: var(--lm-accent); text-decoration: none; font-weight: 600; }
.lm-breadcrumb a:hover { text-decoration: underline; }

.lm-auth-banner {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.lm-auth-banner--ok { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.lm-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}
.lm-btn--primary { background: var(--lm-accent); color: #fff; }
.lm-btn--ghost { background: #fff; color: var(--lm-accent); border: 1px solid var(--lm-accent); }
.lm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.lm-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}
@media (max-width: 960px) {
  .lm-layout { grid-template-columns: 1fr; }
}

#lm-map {
  height: min(60vh, 520px);
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--lm-border);
  z-index: 1;
}
.lm-map-wrap { min-height: 200px; }

.lm-hint { font-size: 0.8rem; color: var(--lm-muted); margin-top: 0.35rem; }
.lm-measures {
  display: flex; flex-wrap: wrap; gap: 1rem;
  background: var(--lm-card);
  border: 1px solid var(--lm-border);
  border-radius: 10px; padding: 0.6rem 0.9rem;
  font-size: 0.9rem; margin-top: 0.5rem;
}
.lm-measures strong { color: var(--lm-accent); }

.lm-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lm-card {
  background: var(--lm-card);
  border: 1px solid var(--lm-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.lm-card h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--lm-muted); margin: 0 0 0.5rem; }
.lm-form-row { margin-bottom: 0.5rem; }
.lm-form-row label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.2rem; }
.lm-form-row input, .lm-form-row select, .lm-form-row textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--lm-border);
  border-radius: 6px;
  font: inherit;
}
.lm-form-row textarea { min-height: 2.4rem; resize: vertical; }
.lm-form-inline { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: end; }
.lm-farm-line { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.lm-farm-line select { flex: 1; min-width: 140px; }
.lm-parcel-list { list-style: none; margin: 0; padding: 0; max-height: 10rem; overflow: auto; }
.lm-parcel-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0.35rem; border-radius: 6px; cursor: pointer; }
.lm-parcel-list li:hover { background: #f1f5f9; }
.lm-parcel-list li.lm--active { background: #dcfce7; }
.lm-swatch { width: 0.6rem; height: 0.6rem; border-radius: 2px; flex-shrink: 0; }
.lm-sublist { font-size: 0.85rem; list-style: none; margin: 0; padding: 0; }
.lm-sublist li { padding: 0.3rem 0; border-bottom: 1px solid #f1f5f9; }
.lm-sublist li:last-child { border-bottom: none; }
.lm-error { color: #b91c1c; font-size: 0.85rem; margin-top: 0.3rem; }
.lm-usage { font-size: 0.75rem; color: var(--lm-muted); }

/* Leaflet draw z-index */
.leaflet-top, .leaflet-bottom { z-index: 400; }
.leaflet-control-layers, .leaflet-bar { z-index: 500; }
