/* Su Finca — estilos compartidos (landing + portal)
   Paleta oficial EcoAndes Drone */
:root {
  --verde: #55962a;
  --verde-oscuro: #254032;
  --noche: #0b2117;
  --fondo: #fbfdfb;
  --fondo-verde: #eef5e9;
  --texto: #1c2b22;
  --texto-suave: #5c6f62;
  --blanco: #ffffff;
  --rojo: #c0392b;
  --amarillo: #d4a017;
  --radio: 14px;
  --sombra: 0 4px 18px rgba(11, 33, 23, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.55;
}

/* ---------- Barra superior ---------- */
.topbar {
  background: var(--noche);
  color: var(--blanco);
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .marca {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--blanco);
}
.marca .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--verde);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.topbar nav a {
  color: var(--blanco);
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 600;
  opacity: 0.9;
}
.topbar nav a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Contenido ---------- */
.contenedor {
  max-width: 1020px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
}

/* ---------- Héroe (landing) ---------- */
.heroe {
  background: linear-gradient(135deg, var(--verde-oscuro), var(--noche));
  color: var(--blanco);
  border-radius: var(--radio);
  padding: 2.5rem 2rem;
  margin: 1.2rem 0 2rem;
  box-shadow: var(--sombra);
}
.heroe h1 { margin: 0 0 0.4rem; font-size: 2.2rem; }
.heroe h1 .eco { color: #9ed07e; }
.heroe p.sub {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 620px;
}
.botones { margin-top: 1.4rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primario { background: var(--verde); color: var(--blanco); }
.btn-primario:hover { background: #468322; }
.btn-claro { background: var(--blanco); color: var(--verde-oscuro); }
.btn-fantasma {
  background: transparent;
  color: var(--blanco);
  border: 2px solid rgba(255, 255, 255, 0.6);
}
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-pequeno { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.btn-peligro { background: var(--rojo); color: var(--blanco); }

/* ---------- Tarjetas de módulos ---------- */
.seccion-titulo { margin: 2.2rem 0 0.3rem; font-size: 1.5rem; color: var(--verde-oscuro); }
.seccion-sub { color: var(--texto-suave); margin-top: 0; }
.rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.tarjeta {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 1.3rem;
  box-shadow: var(--sombra);
  border-top: 4px solid var(--verde);
}
.tarjeta .icono { font-size: 2rem; }
.tarjeta h3 { margin: 0.5rem 0 0.3rem; color: var(--verde-oscuro); }
.tarjeta p { margin: 0; color: var(--texto-suave); font-size: 0.95rem; }

/* ---------- Aviso etiqueta ---------- */
.aviso-etiqueta {
  background: #fff8e6;
  border: 1px solid var(--amarillo);
  border-left: 6px solid var(--amarillo);
  border-radius: var(--radio);
  padding: 1rem 1.2rem;
  margin: 2rem 0;
  font-size: 0.95rem;
}
.aviso-etiqueta strong { color: #7a5b00; }

/* ---------- Formularios y listas (portal) ---------- */
.panel {
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 1.4rem;
  margin-bottom: 1.4rem;
}
.panel h2 { margin-top: 0; color: var(--verde-oscuro); }
.campo { margin-bottom: 0.9rem; }
.campo label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.campo input, .campo select, .campo textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 560px) { .fila { grid-template-columns: 1fr; } }

.lote {
  border: 1px solid #e2e9e3;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.lote .info strong { color: var(--verde-oscuro); }
.lote .info small { color: var(--texto-suave); display: block; }
.lote .acciones { display: flex; gap: 0.4rem; }

.producto {
  border: 1px solid #e2e9e3;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.7rem;
}
.producto strong { color: var(--verde-oscuro); }
.producto .ica {
  display: inline-block;
  background: var(--fondo-verde);
  color: var(--verde-oscuro);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 0.4rem;
}
.producto small { color: var(--texto-suave); display: block; margin-top: 0.2rem; }

.alerta {
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.alerta-advertencia { background: #fff3e0; border: 1px solid var(--amarillo); }
.alerta-error { background: #fdecea; border: 1px solid var(--rojo); }
.alerta-ok { background: var(--fondo-verde); border: 1px solid var(--verde); }

/* ---------- Pie ---------- */
.pie {
  background: var(--noche);
  color: var(--blanco);
  text-align: center;
  padding: 1.6rem 1rem;
  font-size: 0.9rem;
}
.pie p { margin: 0.25rem 0; opacity: 0.85; }

/* Acceso: campo de clave con ojo para ver lo escrito */
.clave-ojo { position: relative; }
.clave-ojo input { width: 100%; padding-right: 3rem; box-sizing: border-box; }
.ojo {
  position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 1.4rem; cursor: pointer;
  padding: 0.4rem; line-height: 1;
}
.enlace-chico { font-size: 0.95rem; display: inline-block; margin-top: 0.3rem; }
.separador { border: none; border-top: 1px solid #dfe7e0; margin: 1.4rem 0; }

/* ============ Portal: navegación por secciones ============ */
.nav-secciones { display: inline-flex; gap: 0.1rem; flex-wrap: wrap; align-items: center; }
.nav-secciones a {
  color: var(--blanco); text-decoration: none; margin-left: 0.2rem;
  padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.92rem;
  font-weight: 600; opacity: 0.92; white-space: nowrap;
}
.nav-secciones a:hover { opacity: 1; background: rgba(255,255,255,0.15); text-decoration: none; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 0.4rem; }
  .nav-secciones a { font-size: 0.82rem; padding: 0.4rem 0.55rem; margin-left: 0; }
}

/* ============ Lotes: tarjetas elegantes ============ */
.lote {
  border: 1px solid #dfe8df; border-radius: 12px; padding: 1rem 1.1rem;
  margin-bottom: 0.8rem; display: flex; justify-content: space-between;
  align-items: flex-start; gap: 0.8rem; flex-wrap: wrap;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf5 100%);
  box-shadow: 0 2px 10px rgba(11,33,23,0.06);
}
.lote .info { flex: 1 1 220px; }
.lote .info strong { color: var(--verde-oscuro); font-size: 1.12rem; }
.lote .info small { color: var(--texto-suave); display: block; margin-top: 0.15rem; }
.lote .acciones { display: flex; gap: 0.4rem; }
.chip {
  display: inline-block; background: var(--fondo-verde); color: var(--verde-oscuro);
  border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.82rem;
  font-weight: 700; margin: 0.25rem 0.25rem 0 0; white-space: nowrap;
}
.chip-gris { background: #eef1ee; color: var(--texto-suave); }

/* ============ Calculadora: pasos y resultado llamativo ============ */
.paso-calc {
  background: var(--blanco); border: 1px solid #e3ece3; border-radius: 12px;
  padding: 1.1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--sombra);
}
.paso-calc h3 { margin: 0 0 0.8rem; color: var(--verde-oscuro); font-size: 1.08rem; }
.paso-num {
  display: inline-flex; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--verde), #3c7a1e); color: #fff;
  align-items: center; justify-content: center; font-weight: 800;
  margin-right: 0.5rem; font-size: 0.95rem;
}
.res-card {
  background: linear-gradient(135deg, #2e7d32 0%, #55962a 100%);
  color: #fff; border-radius: 14px; padding: 1.3rem 1.4rem;
  margin: 0.8rem 0; box-shadow: var(--sombra);
}
.res-card .res-nombre { font-weight: 800; font-size: 1.05rem; }
.res-card .res-ica {
  display: inline-block; background: rgba(255,255,255,0.22); border-radius: 999px;
  padding: 0.1rem 0.6rem; font-size: 0.75rem; font-weight: 700; margin-left: 0.4rem;
}
.res-card .res-uso { opacity: 0.92; font-size: 0.92rem; margin: 0.2rem 0 0.6rem; }
.res-card .res-num { font-size: 1.9rem; font-weight: 800; line-height: 1.2; }
.res-card .res-num small { font-size: 1rem; font-weight: 600; opacity: 0.92; }
.res-card .res-sec { margin-top: 0.5rem; font-size: 1.05rem; }
.res-card .res-sec strong { font-weight: 800; }

/* ============ Catálogo de productos ============ */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; }
.prod-card {
  border: 1px solid #e2e9e3; border-radius: 12px; padding: 1rem 1.1rem;
  background: #fff; cursor: pointer; font-family: inherit; text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  box-shadow: 0 1px 6px rgba(11,33,23,0.05);
}
.prod-card:hover { transform: translateY(-2px); box-shadow: var(--sombra); border-color: var(--verde); }
.prod-card strong { color: var(--verde-oscuro); font-size: 1.05rem; display: block; margin-bottom: 0.3rem; }
.prod-card .prod-ia { color: var(--texto-suave); font-size: 0.88rem; display: block; margin-bottom: 0.45rem; }
.prod-tipo {
  display: inline-block; border-radius: 999px; padding: 0.15rem 0.7rem;
  font-size: 0.78rem; font-weight: 800; margin-right: 0.3rem;
}
.prod-tipo.herbicida { background: #fff3e0; color: #a86a00; }
.prod-tipo.fungicida { background: #e8f0fe; color: #1a56db; }
.prod-tipo.insecticida { background: #fdecea; color: #b3261e; }
.prod-tipo.otro { background: #eef1ee; color: var(--texto-suave); }
.prod-card .ver { color: var(--verde); font-weight: 700; font-size: 0.9rem; }
.prod-ficha { background: #fff; border: 1px solid #e2e9e3; border-radius: 12px; padding: 1.2rem 1.3rem; box-shadow: var(--sombra); }
.prod-ficha h3 { margin: 0 0 0.6rem; color: var(--verde-oscuro); font-size: 1.3rem; }
.prod-paraque { background: var(--fondo-verde); border-radius: 10px; padding: 0.9rem 1rem; margin: 0.8rem 0; }
.prod-tecnica { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.4rem 1rem; margin: 0.8rem 0; font-size: 0.93rem; }
.prod-tecnica div strong { color: var(--verde-oscuro); }
.uso-card { border: 1px solid #e7eee7; border-radius: 10px; padding: 0.8rem 1rem; margin-bottom: 0.6rem; background: #fbfdfb; }
.uso-card strong { color: var(--verde-oscuro); }
.uso-card .dosis { font-size: 1.05rem; font-weight: 700; color: var(--verde-oscuro); }
.uso-card small { color: var(--texto-suave); display: block; margin-top: 0.2rem; }
