* {
  box-sizing: border-box;
}

html,
body,
* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 27px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  background: #123b7a;
  color: #17233a;
  font-family: Inter, Montserrat, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

.auth-wrap {
  width: min(508px, 100%);
}

.auth-card {
  width: 100%;
  min-height: min(899px, calc(100dvh - 54px));
  padding: 156px 54px 52px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 32px 82px rgba(4, 24, 61, 0.46);
}

body.auth-tab-login .auth-card {
  min-height: auto;
  padding-top: 86px;
  padding-bottom: 90px;
}

body.auth-tab-register .auth-card {
  min-height: min(820px, calc(100dvh - 54px));
  padding-top: 86px;
  padding-bottom: 74px;
}

.auth-tabs {
  width: 100%;
  min-height: 64px;
  margin: 0 0 38px;
  padding: 7px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  background: #f0f1f5;
  border-radius: 19px;
}

.auth-tab {
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #a0a7b7;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.auth-tab:hover {
  color: #123b7a;
}

.auth-tab.is-active {
  background: #123b7a;
  color: #fff;
  box-shadow: 0 13px 21px rgba(18, 59, 122, 0.28);
}

.auth-panels {
  width: 100%;
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.auth-panel-head {
  margin: 0 0 40px;
  text-align: center;
}

.auth-panel-head h1 {
  margin: 0 0 8px;
  color: #123b7a;
  font-size: 35px;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-panel-head p {
  margin: 0;
  color: #6d778c;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
}

.auth-form {
  display: grid;
  gap: 27px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  color: #4b566d;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-input-shell {
  position: relative;
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #f6f7f9;
  border: 1px solid transparent;
  border-radius: 18px;
  color: #9ca6b8;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.auth-input-shell:focus-within {
  background: #fff;
  border-color: rgba(10, 166, 196, 0.36);
  box-shadow: 0 0 0 4px rgba(10, 166, 196, 0.12);
}

.auth-input-icon {
  position: absolute;
  left: 19px;
  top: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  color: #98a2b4;
  pointer-events: none;
}

.auth-input-icon svg,
.auth-password-toggle svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-input-shell input {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  border: 0;
  outline: 0;
  padding: 0 20px 0 54px;
  background: transparent;
  color: #263247;
  font: inherit;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-input-shell.has-action input {
  padding-right: 62px;
}

.auth-input-shell input::placeholder {
  color: #9da6b6;
  opacity: 1;
}

.auth-password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  width: 36px;
  height: 36px;
  border: 0;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  background: transparent;
  color: #98a2b4;
  cursor: pointer;
  border-radius: 50%;
  transition: background 180ms ease, color 180ms ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  background: rgba(18, 59, 122, 0.08);
  color: #123b7a;
  outline: 0;
}

.auth-submit {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 17px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #123b7a 0%, #0aa6c4 100%);
  box-shadow: 0 14px 24px rgba(18, 59, 122, 0.29);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  filter: brightness(1.04);
  box-shadow: 0 17px 28px rgba(18, 59, 122, 0.34);
  transform: translateY(-1px);
  outline: 0;
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-msg {
  margin: -18px 0 24px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff0f0;
  border: 1px solid #ffc4c4;
  color: #9f1f1f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-height: 850px) and (min-width: 641px) {
  body.auth-page {
    align-items: flex-start;
  }

  .auth-card {
    min-height: auto;
    padding-top: 82px;
  }
}

@media (max-width: 640px) {
  body.auth-page {
    padding: 16px;
  }

  .auth-wrap {
    width: 100%;
  }

  .auth-card {
    min-height: calc(100dvh - 32px);
    padding: 58px clamp(20px, 6vw, 34px) 30px;
    border-radius: 24px;
  }

  body.auth-tab-login .auth-card {
    min-height: auto;
    padding-top: 52px;
    padding-bottom: 34px;
  }

  body.auth-tab-register .auth-card {
    min-height: auto;
    padding-top: 52px;
    padding-bottom: 34px;
  }

  .auth-tabs {
    min-height: 58px;
    margin-bottom: 32px;
    padding: 6px;
    border-radius: 17px;
  }

  .auth-tab {
    min-height: 46px;
    border-radius: 13px;
    font-size: 14px;
  }

  .auth-panel-head {
    margin-bottom: 32px;
  }

  .auth-panel-head h1 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .auth-panel-head p {
    font-size: 16px;
  }

  .auth-form {
    gap: 22px;
  }

  .auth-input-shell {
    min-height: 62px;
    border-radius: 17px;
  }

  .auth-input-shell input {
    min-height: 60px;
    font-size: 17px;
  }

  .auth-submit {
    min-height: 58px;
  }

}

@media (max-width: 380px) {
  .auth-card {
    padding-inline: 18px;
  }

  .auth-tab {
    font-size: 13px;
  }

  .auth-panel-head h1 {
    font-size: 27px;
  }
}
