.layout {
  grid-template-rows: 14vh auto 5vh;
}
.main {
  min-height: 81vh;
  justify-content: center;
  align-items: center;
  background-image: url("../Assets/background-referral.png");
  background-color: #ccc;
  background-position-x: right;
  background-position-y: bottom;
}
@media screen and (max-width: 768px) {
  .main {
    background-image: url("../Assets/background-referral-mobile.png");
    background-size: cover;
    background-position-y: bottom;
  }
}
.main > div {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}
.navbar {
  justify-content: space-between;
}
.navbar-inner {
  width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0px 12px;
}

.form {
  max-width: none;
}

#ref {
  min-width: 386px;
}

.left-title,
.left-description {
  font: var(--font_6);
  color: #000;
}
.left-title {
  font-size: 38px;
  font-weight: 700;
  line-height: 39px;
}
.left-description {
  font-size: 14px;
}

.ref_input {
  position: relative;
  margin: 20px;
}

input {
  border: none;
  border-bottom: 2px solid #ccc;
  padding: 8px 0;
  font-size: 16px;
  background: transparent;
  width: 100%;
  outline: none;
  transition: border-color 0.3s;
  color: #fff;
}

input:focus {
  border-color: #1691d7;
}

input:focus + span,
input:not(:placeholder-shown) + span {
  top: -16px;
  font-size: 12px;
  color: #1691d7;
}

span:not(.not-designed-btn) {
  position: absolute;
  left: 0;
  top: 10px;
  font-size: 14px;
  color: #bbb;
  pointer-events: none;
  transition: top 0.3s, font-size 0.3s, color 0.3s;
}

input:not(:placeholder-shown) {
  border-color: #1691d7;
}

input.invalid {
  background: transparent;
  border: none;
  border-bottom: 2px solid red;
  padding: 8px 0px;
}
input.invalid:hover {
  border: none;
  border-bottom: 2px solid red;
  color: #fff;
}
input.invalid + span {
  color: red;
}

.small {
  color: #1691d7;
}

@media screen and (max-width: 992px) {
  .layout {
    display: grid;
    grid-template-rows: 14vh auto auto;
  }
  #ref {
    min-width: 320px;
  }
}

@media screen and (max-width: 768px) {
  .main > div {
    flex-direction: column;
    gap: 48px;
    padding: 24px 16px;
  }
  .main > div > div:nth-child(1) {
    text-align: center;
  }
  .left-description {
    text-align: justify;
    text-align-last: center;
  }
  .left-title {
    margin: 16px;
  }
  #ref {
    min-width: 480px;
  }
}
@media screen and (max-width: 580px) {
  .form {
    width: 100%;
  }
  #ref {
    min-width: auto;
  }
}
@media screen and (max-width: 480px) {
  .layout {
    grid-template-rows: 15vh auto auto;
  }
  .left-title {
    font-size: 28px;
  }
  .left-description {
    font-size: 12px;
  }
  .navbar-inner img {
    width: 100%;
  }
  .navbar {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
  .navbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
