table {
  width: 95%;
  border-collapse: collapse;
  text-align: center;
}

td, th {
  padding: 3px;
  width: 50px;
  height: 35px;
  border: 1px solid #000000;
}

table input {
  min-width: calc(100% - 2px);       /* минус 2 пикселя бордеров */
  height: calc(100% + 6px);
  margin: 0 -3px; padding: 0 0.3em;
  font: inherit;
  border: 0;
  background: transparent;
}

table input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(0,150,255, 0.3);
}