.auth-body {
  background: var(--page);
}

.auth-main {
  width: 100%;
  min-height: 100vh;
}

.login-box {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 82px 20px 56px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--page);
}

.login-box::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("/assets/img/background/auth-bg.webp") center / cover
    no-repeat;
  opacity: 0.18;
  pointer-events: none;
}

.login-box::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgb(247 247 247 / 80%);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(34, 34, 34, 0.08);
}

.login-card h1 {
  margin: 0 0 20px;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
}

.login-title-logo {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0 0 26px;
}

.login-title-logo img {
  display: block;
  height: auto;
}

.auth-copy {
  margin-bottom: 13px;
}

.auth-copy h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 500;
}

.auth-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
}

.auth-copy-code {
  margin-bottom: 12px;
}

.floating-field {
  position: relative;
  margin-top: 12px;
}

.floating-field:first-of-type {
  margin-top: 0;
}

.floating-field input {
  height: 48px;
  padding: 18px 11px 7px;
}

.floating-placeholder {
  position: absolute;
  left: 11px;
  top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  transition:
    top 0.16s ease,
    font-size 0.16s ease,
    color 0.16s ease;
}

.floating-field input:focus + .floating-placeholder,
.floating-field input:not(:placeholder-shown) + .floating-placeholder {
  top: 7px;
  font-size: 11px;
  color: var(--muted);
}

.floating-field input:focus + .floating-placeholder {
  color: var(--brand);
}

.floating-field input.is-invalid + .floating-placeholder {
  color: var(--danger);
}

.password-login-form button[type="submit"],
.sms-request-form button[type="submit"] {
  width: 100%;
  margin-top: 14px;
}

.auth-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.auth-actions-row > button {
  padding-top: 10px;
}

.auth-text-link,
.resend-btn {
  width: auto;
  min-height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

.auth-text-link:hover,
.resend-btn:hover:not(:disabled) {
  background: transparent;
  color: var(--brand-dark);
}

.auth-text-link.is-muted {
  color: var(--muted);
}

.auth-text-link.is-muted:hover {
  color: #555555;
}

.resend-btn {
  display: block;
  margin: 12px auto 0;
  color: var(--brand);
  text-align: center;
}

.resend-btn:disabled {
  background: transparent;
  color: var(--muted);
  cursor: default;
}

.recovery-panel {
  display: grid;
  gap: 14px;
}

.code-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.code-inputs input {
  height: 46px;
  min-height: 46px;
  padding: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 400;
}

.code-inputs input.is-invalid {
  border-color: var(--danger);
}

.field-error {
  display: none;
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
}

.field-error.is-visible {
  display: block;
}

.form-result {
  display: none;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}

.form-result.is-visible {
  display: block;
}

.form-result.is-success {
  color: #246b36;
}

.form-result.is-info {
  color: var(--muted);
}

.form-result.is-error {
  color: var(--danger);
}

.auth-bottom-links {
  position: fixed;
  z-index: 2;
  right: 22px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.auth-bottom-links a:hover {
  color: var(--brand);
}

@media (max-width: 620px) {
  .login-box {
    padding: 82px 16px 86px;
  }

  .login-card {
    padding: 20px;
  }

  .auth-bottom-links {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
    text-align: center;
  }
}
