.auth-header-inner {
  grid-template-columns: 1fr auto;
}

.auth-header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-switch-button {
  min-width: 84px;
  height: 38px;
  border: 1px solid rgba(32, 35, 43, .17);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .55);
  color: var(--text);
  cursor: pointer;
  font-weight: 590;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.auth-switch-button:hover,
.auth-switch-button:focus-visible {
  border-color: var(--brand);
  background: rgba(82, 114, 223, .06);
  color: var(--brand);
}

.auth-main {
  width: min(430px, calc(100% - 36px));
  flex: 1;
  margin: 0 auto;
  padding: 74px 0 42px;
}

.auth-heading {
  margin: 0;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.auth-subtitle {
  margin: 13px 0 36px;
  color: var(--muted);
  font-size: 16px;
}

.auth-card {
  padding: 30px;
  border: 1px solid rgba(32, 35, 43, .09);
  border-radius: 20px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 24px 70px rgba(48, 59, 89, .07);
  backdrop-filter: blur(16px);
}

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

.auth-field label {
  display: block;
  margin: 0 0 8px;
  font-weight: 630;
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(32, 35, 43, .25);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.auth-input.password-input {
  padding-right: 62px;
}

.auth-input::placeholder {
  color: #a2a8b3;
}

.auth-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(82, 114, 223, .13);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  padding: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.auth-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remember-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.auth-link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--link);
  cursor: pointer;
}

.auth-link-button:hover,
.auth-link-button:focus-visible {
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
}

.auth-message {
  margin: 0 0 20px;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-message.success {
  border: 1px solid rgba(69, 122, 85, .18);
  background: rgba(91, 143, 106, .09);
  color: #416b4e;
}

.auth-message.error {
  border: 1px solid rgba(180, 64, 64, .2);
  background: rgba(196, 72, 72, .08);
  color: #9e3939;
}

.auth-alternate {
  margin: 24px 0 0;
  text-align: center;
  color: var(--muted);
}

.auth-note {
  margin: 26px 0 0;
  text-align: center;
  color: var(--soft);
  font-size: 12px;
}

.account-wrap {
  position: relative;
}

.account-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 13px);
  right: 0;
  width: 238px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 50px rgba(34, 44, 70, .14);
}

.account-identity {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.account-identity strong,
.account-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity strong {
  margin-bottom: 2px;
  font-size: 13px;
}

.account-identity span {
  color: var(--muted);
  font-size: 12px;
}

.account-menu-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  padding: 0 16px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.account-menu-button:hover,
.account-menu-button:focus-visible {
  background: rgba(32, 35, 43, .045);
}

@media (max-width: 760px) {
  .auth-header-inner {
    width: calc(100% - 32px);
  }

  .auth-header-actions {
    gap: 8px;
  }

  .auth-header-actions .language-button {
    display: inline-flex;
  }

  .auth-switch-button {
    min-width: 72px;
    height: 36px;
    padding: 0 14px;
  }

  .auth-main {
    padding-top: 46px;
  }

  .auth-heading {
    font-size: 32px;
  }

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