* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box
}

.app>.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.auth-page {
  margin: 0 auto;
  padding: 32px 16px calc(24px + env(safe-area-inset-bottom));

  .auth-title {
    font-size: 5vw;
    font-weight: 500;
    text-align: center;
    color: #282828;
    margin: 6vh 0 14px 0;
  }

  .congrats-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    text-align: center;
    gap: 20px;

    .icon {
      width: 42vw;
      height: 42vw;

      svg {
        width: inherit;
        height: inherit;
      }
    }

    .title {
      font-size: 6vw;
      font-weight: 500;
      color: #282828;
    }
  }

  .auth-card {
    padding: 10vw 11vw;
    margin: 0 auto;
    max-width: 89vw;
    width: 100%;
    background: #fff;
    border-radius: 18px;
    -webkit-box-shadow: 0 18px 36px rgba(0, 0, 0, .15);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .15);

    form {
      margin: 0 auto;

      .agreement {
        margin-top: 10px;
        margin-bottom: 1vw;
        display: flex;
        justify-content: space-between;
        font-size: calc(1vw + 3px);

        input {
          opacity: 0;
          position: absolute;
        }

        label {
          width: 100%;
          display: flex;
          justify-content: space-between;
          align-items: center;
          color: #333;
          text-align: center;

          a {
            text-decoration: none;
            color: #15b980;
          }

          .text {
            font-size: 3vw;
            flex: 2;
            line-height: 200%;
          }
        }

        span {
          position: relative;
          width: 24px;
          height: 24px;
          border: 2px solid transparent;
          border-radius: 4px;
          background: linear-gradient(white, white) padding-box,
            linear-gradient(137deg, #6df27d 0%, #15b980 100%) border-box;
          transition: all 0.3s ease;
          display: flex;
          align-items: center;
          justify-content: center;

          svg {
            width: 14px;
            height: 14px;
            opacity: 0;
            transform: scale(0.8);
            transition: all 0.2s ease;
          }
        }

        input:checked+label svg {
          opacity: 1;
          transform: scale(1);
        }
      }

      .label {
        font-size: 4vw;
        display: block;
        margin: 8px 2px 6px 2px;
        font-weight: 700;
        color: #282828;
      }

      .input-wrap {
        outline: 0;
        -webkit-box-shadow: unset;
        box-shadow: unset;
        padding: 0;
        margin: 0;
        position: relative;
        border-radius: 14px;
        background: #f3f5f6;

        input,
        select {
          appearance: none;
          padding: 3vw 5vw;
          font-size: 3.5vw;
          font-weight: 300;
          color: #282828;
          background-color: #e9e9e9;
          border: none;
          outline: none;
          width: 100%;
          border-radius: 14px;

          &::-webkit-input-placeholder {
            color: #ccc;
          }

          &::-moz-placeholder {
            color: #ccc;
          }

          &:-ms-input-placeholder {
            color: #ccc;
          }

          &::-ms-input-placeholder {
            color: #ccc;
          }

          &::placeholder {
            color: #ccc;
          }
        }
      }

      .input-wrap.error {
        border: 1px solid #eb4545;
      }

      .hint {
        font-size: calc(2vw + 3px);
        font-weight: 300;
        margin-top: 10px;

        #resendBtn {
          position: relative;
          font-size: calc(2vw + 2px);
          font-weight: 400;
          text-decoration: underline;
          text-decoration-skip-ink: none;
          background: grey;
          background-clip: text;
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          border: 0;

          &::after {
            position: absolute;
            content: '';
            height: 1px;
            bottom: 0;
            left: 0;
            right: 0;
            background: grey;
          }
        }

        #resendBtn:not(:disabled) {
          position: relative;
          font-size: calc(2vw + 2px);
          font-weight: 400;
          text-decoration: underline;
          text-decoration-skip-ink: none;
          background: linear-gradient(137deg, #86ff94 0%, #15b980 100%);
          background-clip: text;
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          border: 0;

          &::after {
            position: absolute;
            content: '';
            height: 1px;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(137deg, #86ff94 0%, #15b980 100%);
          }
        }

        span {
          font-weight: 400;
        }
      }

      .hint-bold {
        margin-top: 5px;
        font-weight: 400;
      }

      .input-wrap.with-eye {
        input {
          padding-right: 36px;
        }

        .eye {
          display: flex;
          align-items: center;
          position: absolute;
          right: 8px;
          top: 50%;
          -webkit-transform: translateY(-50%);
          -ms-transform: translateY(-50%);
          transform: translateY(-50%);
          border: none;
          background: transparent;
          padding: 6px;
          border-radius: 8px;
          cursor: pointer;
        }
      }

      .form-errors {
        margin: 5px 0 0 5vw;
        border-radius: 10px;
        color: #eb4545;
        font-size: 3vw;

        div {
          font-size: 3vw;
        }
      }

      .actions {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        gap: 8px;
        margin-top: 12px;

        .muted {
          -ms-flex-negative: 0;
          flex-shrink: 0;
          font-size: 3.5vw;
          font-weight: 300;
          color: #282828;
        }

        .btn-reg {
          display: -ms-inline-flexbox;
          display: inline-flex;
          -webkit-box-align: center;
          -ms-flex-align: center;
          align-items: center;
          gap: 6px;
          padding: 2vw 3vw;
          border-radius: 999px;
          text-decoration: none;
          background: #60e78d;
          color: #282828;
          font-weight: 400;
          font-size: 2.5vw;
        }

        .btn-log {
          position: relative;
          font-weight: 300;
          border-radius: 14px;
          color: #60e78d;
          border: 1px solid #60e78d;

          &:active {
            box-shadow: 0 5px #429f63;
            transform: translateY(4px);
          }
        }
      }

      .forgot {
        text-align: center;
        margin-top: 10px;

        a {
          color: #60e78d;
          text-decoration: none;
          font-size: 3vw;
        }
      }
    }
  }

  /* Саня новые стили */
  .auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 900;
  }

  .auth-modal-backdrop.is-open {
    display: flex;
  }

  .auth-modal {
    max-width: 420px;
    width: 88vw;
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .18);
  }

  .auth-modal-title {
    margin: 0 0 8px;
    font-size: 4vw;
    font-weight: 600;
    color: #282828;
  }

  .auth-modal-text {
    margin: 0;
    font-size: 3vw;
    line-height: 1.4;
    color: #555;
  }

  .auth-modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
  }

  .auth-modal-btn {
    flex: 1;
    border-radius: 14px;
    border: none;
    padding: 3.5vw 4vw;
    font-size: 3vw;
    font-weight: 500;
    cursor: pointer;
    background: linear-gradient(137deg, #86ff94 0%, #15b980 100%);
    color: #fff;
  }

  .auth-modal-btn-secondary {
    background: #f3f5f6;
    color: #282828;
  }

  .homebar-spacer {
    height: calc(16px + env(safe-area-inset-bottom))
  }

  .btn-submit {
    margin: 10px 0;
  }
}

.help {
  position: fixed;
  bottom: 10vw;
  right: 2vw;

  a {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 3vw;
    text-decoration: none;


    span {
      display: block;
      color: #FFF;
      background-color: #60e78d;
      border-radius: 14px;
      padding: 5px 50px 5px 9px;
    }

    img {
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      padding: 10px 8px;
      background-color: #FFF;
      border-radius: 100%;
    }
  }
}

.auth-page.page-with-tabbar {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  min-height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}


#phoneConfirm .sheet-controls {
  display: flex;
  gap: 20px;
}

.sheet-undone {
  text-align: center;
  margin: 6px 0;
}

.sheet-undone.highlighted {
  color: #60e78d;
}


.fb-dark {
  .app {
    .topbar {
      background: #262626;
    }

    .auth-page {
      background: #262626;

      .auth-title {
        color: #f0f0f0;
      }

      .congrats-card {
        .title {
          color: #f0f0f0;
        }
      }

      .auth-card {
        background: #323232;
        -webkit-box-shadow: 0 18px 36px rgba(0, 0, 0, .15);
        box-shadow: 0 18px 36px rgba(0, 0, 0, .15);

        form {
          .label {
            color: #f0f0f0;
          }

          .agreement {

            label {
              color: #F0F0F0;

              span {
                background: linear-gradient(#323232, #323232) padding-box, linear-gradient(137deg, #6df27d 0%, #15b980 100%) border-box;

                svg {
                  path {
                    stroke: #F0F0F0;
                  }
                }
              }

              a {
                color: #15b980;
              }
            }
          }

          .input-wrap {
            background: #2a2a2a;

            input {
              color: #f0f0f0;
              background-color: #2a2a2a;

              &::-webkit-input-placeholder {
                color: #4d4d4d;
              }

              &::-moz-placeholder {
                color: #4d4d4d;
              }

              &:-ms-input-placeholder {
                color: #4d4d4d;
              }

              &::-ms-input-placeholder {
                color: #4d4d4d;
              }

              &::placeholder {
                color: #4d4d4d;
              }
            }

            input:-webkit-autofill,
            input:-webkit-autofill:focus {
              transition: background-color 0s 600000s, color 0s 600000s !important;
            }
          }

          .hint {
            color: #f0f0f0;
          }

          .actions {
            .muted {
              color: #f0f0f0;
            }

            .btn-reg {
              background: #60e78d;
              color: #fff;
            }
          }
        }
      }
    }
  }
}

.support-open-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.profile-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.profile-modal.open {
  display: block;
}

.profile-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4);
}

.profile-modal .modal-dialog {
  position: relative;
  margin: 6vh auto 0;
  width: min(560px, 92vw);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  outline: none;
  z-index: 60;
}

.profile-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.profile-modal .modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.profile-modal .modal-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.profile-modal .support-accord {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.profile-modal .support-row {
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #33D469;
  border: none;
  outline: none;
  color: #fff;
  width: min(320px, 100%);
  font-size: 13px;
  cursor: pointer;
}

.profile-modal .support-row:active {
  transform: scale(.996);
}

.profile-modal .support-meta {
  font-size: 12px;
  margin: 8px 0 10px;
}

.profile-modal .support-meta-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.profile-modal .support-meta-label {
  color: #777;
  min-width: 110px;
}

.profile-modal .support-meta-value {
  font-weight: 500;
  flex: 1;
}

.profile-modal .support-meta-value input,
.profile-modal .support-meta-value select {
  width: 100%;
  border-radius: 12px;
  border: 0;
  background: #e9e9e9;
  padding: 10px 12px;
  font-size: 13px;
}

.profile-modal .support-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 12px;
  border: 0;
  background: #e9e9e9;
  padding: 10px 12px;
  font-size: 13px;
}

.profile-modal .modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, .06);
  margin-top: 10px;
}

.profile-modal .btn-primary,
.profile-modal .btn-secondary {
  border-radius: 12px;
  padding: 10px 14px;
  border: 0;
  cursor: pointer;
  font-size: 14px;
}

.profile-modal .btn-primary {
  background: linear-gradient(137deg, #86ff94 0%, #15b980 100%);
  color: #fff;
}

.profile-modal .btn-primary:disabled {
  opacity: .5;
  cursor: default;
}

.profile-modal .btn-secondary {
  background: #eee;
  color: #222;
}

#regBtn:disabled {
  background: #d7d7d7 !important;
  color: #8a8a8a !important;
  border-color: #d7d7d7 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

#regBtn:disabled:active {
  transform: none !important;
}