#riegosWrapper{
  width:95%;
  margin:auto;
  background:#fff;
  padding:12px 14px 20px;
  font-family: Arial, Helvetica, sans-serif;
}

/* =========================
   ENCABEZADO TIPO FORMATO
========================= */
.riegos-top-head{
  width:100%;
  display:grid;
  grid-template-columns: 120px 1fr 150px;
  align-items:center;
  column-gap:18px;
  margin:4px 0 10px;
}

.riegos-top-logo{
  display:flex;
  align-items:center;
  justify-content:center;
}

.riegos-top-logo img{
  max-width:100px;
  max-height:88px;
  width:auto;
  height:auto;
  object-fit:contain;
}

.riegos-title-box{
  width:100%;
  display:flex;
  justify-content:center;
}

.riegos-header-table{
  width:100%;
  max-width:740px;
  table-layout:fixed;
  border-collapse:collapse;
  background:#fff;
}

.riegos-header-table,
.riegos-header-table th,
.riegos-header-table td{
  border:3px solid #111;
}

.riegos-header-table th,
.riegos-header-table td{
  text-align:center;
  vertical-align:middle;
  padding:4px 6px;
}

.riegos-title-main{
  font-size:18px;
  font-weight:700;
  letter-spacing:.3px;
  padding:6px 4px;
}

.riegos-title-sub{
  font-size:16px;
  font-weight:700;
  padding:4px 4px;
}

.riegos-header-table th{
  font-size:12px;
  font-weight:400;
  white-space:nowrap;
}

.riegos-meta-row td{
  font-size:13px;
  font-weight:400;
  white-space:nowrap;
}

/* =========================
   RANCHO
========================= */
.riegos-rancho-line{
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0 18px;
}

.riegos-rancho-line label{
  font-size:16px;
  font-weight:700;
}

.riegos-rancho-select{
  width:240px !important;
  border:none;
  border-bottom:1px solid #111;
  border-radius:0;
  background:#fff;
  padding-left:0;
}

/* =========================
   TABLA PRINCIPAL
========================= */
.riegos-main-table{
  width:100%;
  border-collapse:collapse;
  margin-top:8px;
}

.riegos-main-table th,
.riegos-main-table td{
  border:2px solid #222;
  text-align:center;
  vertical-align:middle;
}

.riegos-main-table th{
  background:#fff;
  font-weight:700;
  padding:6px 4px;
  font-size:13px;
}

.riegos-main-table td{
  background:#fff;
  padding:2px;
  height:28px;
}

.riegos-main-table input,
.riegos-main-table select{
  width:100%;
  border:none;
  background:transparent;
  padding:4px 6px;
  font-size:12px;
  box-sizing:border-box;
  outline:none;
}

.riegos-main-table input[type="date"],
.riegos-main-table input[type="time"]{
  min-width:100%;
}

/* =========================
   BOTÓN AGREGAR FILA
========================= */
.riegos-add-row-wrap{
  display:flex;
  justify-content:center;
  margin:14px 0 18px;
}

.riegos-add-row-btn{
  min-width:220px;
  padding:10px 22px;
  border:1px solid #999;
  background:#f3f3f3;
  color:#111;
  font-weight:700;
  cursor:pointer;
}

/* =========================
   ZONA INFERIOR
========================= */
.riegos-bottom-zone{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:36px;
  margin-top:28px;
}

/* =========================
   TABLA PEQUEÑA
========================= */
.riegos-small-table{
  width:235px;
  border-collapse:collapse;
}

.riegos-small-table th,
.riegos-small-table td{
  border:2px solid #222;
  text-align:center;
  vertical-align:middle;
}

.riegos-small-table th{
  background:#fff;
  font-weight:700;
  padding:6px 4px;
  font-size:13px;
}

.riegos-small-table td{
  background:#fff;
  padding:2px;
  height:28px;
}

.riegos-small-table input,
.riegos-small-table select{
  width:100%;
  border:none;
  background:transparent;
  padding:4px 6px;
  font-size:12px;
  box-sizing:border-box;
  outline:none;
}

/* =========================
   FIRMAS
========================= */
.riegos-firmas{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:48px;
  padding-top:18px;
  max-width:520px;
}

.firma-row{
  display:flex;
  align-items:center;
  gap:0;
}

.firma-row label{
  min-width:auto;
  font-size:14px;
  font-weight:400;
}

.firma-row input{
  width:240px;
  border:none;
  border-bottom:1px solid #222;
  border-radius:0;
  background:#fff;
  padding:4px 2px;
  margin-left:0;
  outline:none;
}

/* =========================
   BOTÓN SUBIR
========================= */
.riegos-submit-wrap{
  display:flex;
  justify-content:flex-start;
  margin-top:-6px;
}

.riegos-submit-btn{
  min-width:260px;
  padding:12px 26px;
  background:#1f6feb;
  color:#fff;
  border:none;
  font-weight:700;
  cursor:pointer;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1000px){
  .riegos-top-head{
    grid-template-columns: 1fr;
    row-gap:10px;
  }

  .riegos-top-logo{
    justify-content:center;
  }

  .riegos-header-table{
    max-width:none;
  }

  .riegos-bottom-zone{
    flex-direction:column;
  }

  .riegos-small-table{
    width:100%;
    max-width:320px;
  }

  .riegos-firmas{
    max-width:none;
    width:100%;
  }

  .firma-row input{
    width:100%;
    max-width:300px;
  }

  .riegos-submit-wrap{
    justify-content:flex-start;
  }
}

/* =========================
   TABLA POR UBICACIÓN
========================= */
.riegos-main-table th:nth-child(2),
.riegos-main-table td:nth-child(2){
  width:240px;
  min-width:240px;
}

.r_tabla_wrap{
  display:flex;
  flex-direction:column;
  gap:4px;
  width:100%;
}

.r_tabla_display{
  width:100%;
  min-height:28px;
  padding:5px 8px;
  box-sizing:border-box;
  text-align:left;
  font-size:12px;
  font-weight:600;
  color:#555;
  background:#f5f7fa;
  border:1px solid #d0d7de;
  border-radius:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.r_tabla_display.has-value{
  color:#1f2d3d;
  background:#eef4ff;
  border-color:#9bbcf3;
}

.r_tabla_controls{
  display:flex;
  align-items:center;
  gap:4px;
  width:100%;
}

.r_tabla_controls .r_tabla{
  flex:1 1 auto;
  min-width:0;
  width:100%;
}

.r_tabla_controls .r_tabla_geo{
  flex:0 0 28px;
  width:28px !important;
  min-width:28px;
  max-width:28px;
  padding:4px 0;
  margin-top:0 !important;
  line-height:1;
  text-align:center;
}
