@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/roboto-400.woff2") format("woff2");
}

@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/roboto-500.woff2") format("woff2");
}

@font-face {
  font-family: Roboto;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/roboto-600.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff;
  background: #17181c;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, system-ui, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

.page {
  display: flex;
  flex-direction: column;
  width: 100vw;
  min-height: 100dvh;
  color: #fff;
  background: linear-gradient(15deg, #0e0e11 7.05%, #0e0e11 89.67%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.page[hidden] {
  display: none;
}

.header {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  align-items: center;
  height: 68px;
  padding: 0 max(16px, calc((100% - 480px) / 2));
  color: #fff;
  background: #17181c;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}

.logo img {
  display: block;
}

.logo-text {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 46px;
  padding: 0 16px;
  color: #fff;
  border: 0;
  border-radius: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  text-rendering: optimizeLegibility;
  cursor: pointer;
  transition: opacity 0.2s;
}

.button:hover {
  opacity: 0.85;
}

.button--primary {
  background: radial-gradient(136.12% 140.74% at 99.77% 99.04%, #8d28c8 0%, #7c42fa 20%, #007aff 80%, #609ceb 100%);
}

.button--link {
  color: #007aff;
  background: none;
}

.button--big {
  height: 56px;
  padding: 0 20px;
}

.label-short {
  display: none;
}

.content {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 24px 24px 92px;
  overflow: hidden;
}

.content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(28deg, rgba(80, 91, 199, 0.3) 8.03%, rgba(80, 91, 199, 0.3) 91.51%);
  -webkit-mask-image: url("../img/space.svg");
  mask-image: url("../img/space.svg");
  mask-position: 0 0;
  mask-repeat: repeat;
  pointer-events: none;
}

.card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  min-width: 345px;
  max-width: 400px;
  padding: 60px 40px 48px;
  background: #17181c;
  border-radius: 32px;
}

.card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.title {
  width: 100%;
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footnote {
  color: rgba(231, 231, 231, 0.5);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}

.description {
  max-width: 100%;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.notice {
  display: none;
  margin: 0;
  color: rgba(231, 231, 231, 0.5);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

.login {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  color: #fff;
  background: #25262e;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, system-ui, Arial, sans-serif;
}

.login[hidden] {
  display: none;
}

.bar {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 480px;
  height: 64px;
  margin-inline: auto;
}

.bar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.bar-logo img,
.bar-logo svg {
  display: block;
}

.form {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  padding: 12px 15px 0;
}

.login-title {
  margin: 0;
  padding: 0 16px;
  color: #fff;
  font-size: 20.5px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
}

.phone {
  display: flex;
  align-items: center;
  height: 52px;
  margin-top: 28px;
  padding: 0 12px;
  background: #37393f;
  border-radius: 16px;
}

.country {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 16px;
  line-height: 20px;
}

.country-flag {
  display: block;
  width: 20px;
  height: 20px;
}

.phone-input {
  flex: 1;
  min-width: 0;
  margin-left: 8px;
  padding: 0;
  color: #fff;
  caret-color: #fff;
  background: none;
  border: 0;
  outline: 0;
  font-size: 16px;
  line-height: 20px;
}

.phone-input::placeholder {
  color: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

.submit {
  height: 60px;
  margin-top: 20px;
  color: #fff;
  background: #007aff;
  border: 0;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.submit:hover:not(:disabled) {
  background: #479fff;
}

.submit:disabled {
  color: rgba(255, 255, 255, 0.3);
  background: #3e4044;
  cursor: default;
}

.login-legal {
  width: 100%;
  max-width: 480px;
  margin: 12px auto auto;
  padding: 0 12px 7px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

.login-legal a {
  color: #fff;
  font-weight: 400;
  text-decoration: none;
}

.code {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  color: #fff;
  background: #25262e;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, system-ui, Arial, sans-serif;
}

.code[hidden] {
  display: none;
}

.code-bar,
.password-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  width: 100%;
  max-width: 480px;
  height: 64px;
  margin-inline: auto;
}

.code-back,
.password-back {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: #fff;
  background: none;
  border-radius: 24px;
  cursor: pointer;
}

.code-back svg,
.password-back svg {
  display: block;
}

.code-form,
.password-form {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  padding: 20px 16px 0;
}

.code-explainer,
.password-explainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.code-title,
.password-title {
  margin: 0;
  color: #fff;
  font-size: 20.5px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
}

.code-text,
.password-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

.code-code {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.code-cells {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.code-error {
  margin: 0;
  padding: 0 12px;
  color: #ce4257;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.2px;
  text-align: center;
}

.code-error[hidden] {
  display: none;
}

.digit {
  width: 40px;
  height: 52px;
  padding: 0;
  color: #fff;
  caret-color: #007aff;
  background: #37393f;
  border: 0;
  border-radius: 12px;
  outline: 0;
  font-size: 25px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.digit:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 1px;
}

.digit--error {
  color: #ba284e;
  animation: jump 400ms ease-out;
  animation-delay: calc(var(--i) * 80ms);
}

@keyframes jump {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.code-timer {
  margin: 0;
  color: #fff;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0.15px;
  text-align: center;
}

.code-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.code-submit {
  margin-top: 0;
}

.code-resend {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 40px;
}

.explainer-icon {
  display: grid;
  place-content: center;
  align-self: center;
  width: 96px;
  height: 96px;
  color: rgba(255, 255, 255, 0.52);
  background: #37393f;
  border-radius: 50%;
}

.explainer-icon svg {
  display: block;
}

.field {
  position: relative;
  text-align: left;
}

.password-input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 12px;
  color: #fff;
  caret-color: #fff;
  background: #37393f;
  border: 0;
  border-radius: 16px;
  outline: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 20px;
}

.password-eye {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: rgba(255, 255, 255, 0.68);
  background: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s;
}

.password-eye:hover {
  background: rgba(231, 231, 231, 0.04);
}

.password-eye svg {
  display: block;
}

.password-eye .eye-crossed {
  display: none;
}

.password-eye[aria-pressed="true"] .eye-open {
  display: none;
}

.password-eye[aria-pressed="true"] .eye-crossed {
  display: block;
}

.password-input::placeholder {
  color: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

.password-error {
  margin: 8px 0 0;
  padding: 0 12px;
  color: #ce4257;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.2px;
}

.password-error[hidden] {
  display: none;
}

.password-submit {
  margin-top: 0;
}

.resend {
  height: 40px;
  padding: 10px 12px;
  color: #007aff;
  background: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.15px;
  cursor: pointer;
  transition: background 0.12s;
}

.resend:hover {
  background: rgba(231, 231, 231, 0.04);
}

.toast {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 3;
  width: min(351px, calc(100% - 24px));
  padding: 12px 16px;
  color: #fff;
  background: #535458;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 500px) {
  .label-long { display: none; }
  .label-short { display: inline; }
  .card { gap: 24px; padding: 40px; }
  .browser-link { display: none; }
  .notice { display: block; }
}

@media (max-width: 350px) {
  .card { min-width: 300px; padding: 24px; }
}
