.auth {
  position: relative;
  min-height: 100svh;
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0;
}

.auth__bg {
  position: absolute;
  inset: 0;
  background: url("../images/login/bg_full.d29a5fd855ea.png") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  transform: scale(1.02);
  z-index: 0;
}

.auth__panel {
  position: relative;
  z-index: 2;
  align-self: center;
}

.auth-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
  padding: 32px;
  width: 100%;
  max-width: 450px;
  backdrop-filter: blur(2px);
}

.auth-card__title {
  margin: 0;
  line-height: 28px;
  color: #4c4184;
  font-weight: 800;
  font-size: 18px;
}

.auth-card__subtitle {
  margin: 4px 0 0;
  line-height: 20px;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-card__form {
  margin-top: 32px;
}

.auth-field {
  position: relative;
  margin-bottom: 16px;
}

.auth-field__input {
  width: 100%;
  min-width: 180px;
  height: 40px;
  padding: 8px 16px;
  border: 1px solid #DDDEDF;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
  background: #fff;
  outline: none;
  color: #111;
}

.auth-field__label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;

  padding: 0 6px;
  background: #fff;
  pointer-events: none;
  transition: 140ms ease;
}

.auth-field__required {
  color: #8B3DFF;
  font-weight: 800;
}

.auth-field:focus-within .auth-field__input {
  border-color: #8B3DFF;
  box-shadow: 0 0 0 4px rgba(139, 61, 255, 0.14);
}

.auth-field:focus-within .auth-field__label,
.auth-field__input:not(:placeholder-shown)+.auth-field__label {
  top: 0;
  transform: translateY(-50%);
  font-size: 12px;
  color: #8B3DFF;
}

.auth-field__input:-webkit-autofill,
.auth-field__input:-webkit-autofill:hover,
.auth-field__input:-webkit-autofill:focus,
.auth-field__input:-webkit-autofill:active {
  -webkit-text-fill-color: #111;
  caret-color: #111;
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}

.auth-field__input:autofill {
  box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #111;
}

/* Error states */
.auth-field--error .auth-field__input {
  border-color: #dc2626;
}

.auth-field--error .auth-field__label {
  color: #dc2626;
}

.auth-field__error-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #dc2626;
  font-weight: 500;
}

.auth__messages {
  margin-bottom: 16px;
}

.auth__message {
  margin: 0 0 8px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid transparent;
}

.auth__message:last-child {
  margin-bottom: 0;
}

.auth__message--error {
  background-color: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.auth__message--warning {
  background-color: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.auth__message--success {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.auth__message--info {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.auth__error {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #dc2626;
  font-size: 14px;
}

.auth__error p {
  margin: 0;
}

.auth__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.auth__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.auth__checkbox-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.auth__checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: #fff;
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.auth__checkbox-text {
  font-size: 14px;
  color: var(--text-muted);
}

.auth__checkbox-input:checked+.auth__checkbox-box {
  border-color: rgba(139, 61, 255, 0.85);
  background: rgba(139, 61, 255, 0.15);
}

.auth__checkbox-input:checked+.auth__checkbox-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid rgba(139, 61, 255, 0.95);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth__checkbox-input:focus-visible+.auth__checkbox-box {
  outline: 3px solid rgba(139, 61, 255, 0.25);
  outline-offset: 2px;
}

.auth__link {
  color: #8B3DFF;
  font-weight: 800;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.auth__link:hover {
  text-decoration: underline;
  color: #732ed6;
}

.auth__submit {
  width: 100%;
  background-color: #8B3DFF;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 32px;
}

.auth__submit:hover {
  background-color: #732ed6;
  filter: brightness(0.98);
}

.auth__footer {
  margin: 8px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* Large tablets / small laptops */
@media (max-width: 1024px) {
  .auth__panel {
    margin-left: 0;
    padding: 32px 24px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .auth__bg {
    background-attachment: scroll;
    background: url("../images/login/bg_mobile.5f8c30b37859.png") no-repeat center top;
    background-position: fixed;
    background-size: cover;
  }

  .auth {
    justify-content: center;
    align-items: center;
  }

  .auth__panel {
    width: min(520px, 100%);
    margin-left: 0;
    margin-top: 0px;
    padding: calc(20px + env(safe-area-inset-top)) 16px 24px;
    gap: 16px;
  }

  .auth__logo {
    width: 170px;
    height: auto;
  }

  .auth-card {
    max-width: none;
    padding: 24px;
    border-radius: 14px;
  }
}

/* Phones */
@media (max-width: 480px) {
  .auth {
    align-items: flex-start;
  }

  .auth__logo {
    display: none;
  }

  .auth__bg {
    background: url("../images/login/bg_mobile.5f8c30b37859.png") no-repeat center top;
    background-size: cover;
    background-attachment: scroll;
  }

  .auth__panel {
    margin-top: 80px;
    padding: calc(16px + env(safe-area-inset-top)) 14px 20px;
    gap: 12px;
  }

  .auth__logo {
    width: 150px;
  }

  .auth-card {
    padding: 20px;
    border-radius: 14px;
  }

  .auth-card__title {
    font-size: 16px;
    line-height: 22px;
  }

  .auth-card__subtitle {
    font-size: 13px;
    line-height: 18px;
  }

  .auth-field__input {
    height: 42px;
    padding: 11px 12px;
  }

  .auth-field__label {
    left: 10px;
  }

  .auth__row {
    gap: 10px;
    margin: 6px 0 14px;
  }

  .auth__submit {
    padding: 12px 18px;
    font-size: 15px;
  }

  .auth__footer {
    font-size: 13px;
  }
}
