.auth-page .focus {
  padding-top: 12px;
}

.auth {
  width: 100%;
  max-width: 440px;
}

.auth--single {
  max-width: 460px;
}

.auth--manage {
  max-width: 560px;
}

.auth__brand {
  display: none;
}

.auth__card {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 28px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-3);
}

.auth__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.auth__title {
  font-size: var(--fs-24);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.auth__subtitle {
  margin-bottom: 12px;
  font-size: var(--fs-17);
  font-weight: 700;
}

.auth__text {
  color: var(--text-secondary);
  font-size: var(--fs-14);
  line-height: 1.55;
}

.auth__text + .auth__text {
  margin-top: 4px;
}

.auth__text strong {
  color: var(--text);
  font-weight: 600;
}

.auth__email {
  word-break: break-all;
}

.auth__switch {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: var(--fs-14);
  text-align: center;
}

.auth__switch a {
  font-weight: 600;
}

.auth__footnote {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: var(--fs-13);
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form .field + .field,
.auth-form .form-errors + .field {
  margin-top: 0;
}

.auth-form__errors {
  margin-bottom: 4px;
}

.auth-form__errors p + p {
  margin-top: 4px;
}

.auth-form__submit {
  margin-top: 4px;
}

.auth-form__check {
  align-self: flex-start;
  min-height: 40px;
  user-select: none;
  -webkit-user-select: none;
}

.auth-form__terms,
.auth-form__hint {
  color: var(--text-muted);
  font-size: var(--fs-13);
  line-height: 1.5;
}

.auth-form__terms a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: rgba(169, 184, 184, .4);
}

.auth-form__terms a:hover {
  color: var(--text);
}

.auth-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.field__aside {
  flex-shrink: 0;
  font-size: var(--fs-13);
  font-weight: 500;
}

.field__aside:hover {
  text-decoration: underline;
}

.password-input {
  position: relative;
}

.password-input .input {
  padding-right: 52px;
}

.password-input .input::-ms-reveal,
.password-input .input::-ms-clear {
  display: none;
}

.password-input__toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--text-muted);
  transform: translateY(-50%);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.password-input__toggle:hover {
  background: var(--hover-tint);
  color: var(--text);
}

.password-input__hide,
.password-input__toggle[aria-pressed="true"] .password-input__show {
  display: none;
}

.password-input__toggle[aria-pressed="true"] .password-input__hide {
  display: inline-block;
}

.no-js .password-input__toggle {
  display: none;
}

.strength {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
}

.strength__track {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: var(--r-full);
  background: var(--surface-2);
}

.strength__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
  transition: width var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.strength__label {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: var(--fs-12);
  font-weight: 600;
  white-space: nowrap;
}

.strength[data-level="0"] .strength__fill { width: 12%; }
.strength[data-level="1"] .strength__fill { width: 30%; }
.strength[data-level="2"] .strength__fill { width: 55%; background: var(--warning); }
.strength[data-level="3"] .strength__fill { width: 80%; background: var(--link); }
.strength[data-level="4"] .strength__fill { width: 100%; background: var(--green); }
.strength[data-level="0"] .strength__label,
.strength[data-level="1"] .strength__label { color: var(--danger-hover); }
.strength[data-level="2"] .strength__label { color: var(--warning); }
.strength[data-level="3"] .strength__label { color: var(--link); }
.strength[data-level="4"] .strength__label { color: var(--green); }

.field__note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  font-weight: 600;
  line-height: 1.4;
}

.field__note .icon {
  width: 14px;
  height: 14px;
}

.field__note--ok {
  color: var(--green);
}

.field__note--warn {
  color: var(--warning);
}

.captcha {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.captcha__picture {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.captcha__image {
  display: block;
  width: auto;
  max-width: calc(100% - 48px);
  height: 50px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #FFFFFF;
  object-fit: contain;
}

.captcha[aria-busy="true"] .captcha__image {
  opacity: .5;
}

.captcha__refresh.is-spinning .icon {
  animation: ml-spin .8s linear infinite;
}

.captcha__answer {
  letter-spacing: .08em;
}

.auth-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  text-align: center;
}

.auth-message .auth__text {
  max-width: 380px;
}

.auth-message__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border-radius: 20px;
  background: rgba(34, 185, 156, .16);
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(180, 249, 249, .12);
}

.auth-message__icon--warning {
  background: rgba(230, 188, 80, .14);
  color: var(--warning);
  box-shadow: inset 0 0 0 1px rgba(230, 188, 80, .18);
}

.auth-message__icon--success {
  background: rgba(96, 218, 100, .14);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(96, 218, 100, .18);
}

.auth__head .auth-message__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  border-radius: 18px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: var(--fs-13);
  line-height: 1.5;
}

.auth-note__icon {
  margin-top: 1px;
  color: var(--blue);
}

.auth-note__body {
  min-width: 0;
}

.auth-note__body p + p {
  margin-top: 6px;
}

.email-list {
  display: flex;
  flex-direction: column;
  margin: 0 0 28px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  list-style: none;
}

.email-list__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
}

.email-list__item + .email-list__item {
  border-top: 1px solid var(--border);
}

.email-list__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.email-list__address {
  min-width: 0;
  font-weight: 600;
  word-break: break-all;
}

.email-list__badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.email-list__badges .chip .icon {
  width: 12px;
  height: 12px;
  margin-right: -2px;
}

.email-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-list__remove {
  color: var(--danger-hover);
}

.email-list__remove:hover {
  color: var(--danger-hover);
}

.email-add {
  padding-top: 4px;
}

.email-add .auth-form__submit {
  align-self: flex-start;
}

@media (max-width: 767.98px) {
  .auth-settings-link {
    width: 34px;
    padding: 0;
  }

  .auth-page .focus {
    justify-content: flex-start;
    padding: 8px 12px 32px;
  }

  .auth__card {
    padding: 24px 18px;
  }
}

@media (min-width: 768px) {
  .auth__card {
    padding: 36px 40px;
  }
}

@media (min-width: 960px) {
  .auth--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    max-width: 980px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-3);
  }

  .auth--split .auth__card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 44px 44px 40px;
  }

  .auth--split .auth__brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 48px 44px;
    background-color: #4B6B6B;
    background-image: radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, .1), transparent 60%);
    color: #FFFFFF;
  }
}

.auth__logo {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin-left: -6px;
}

.auth__lead {
  max-width: 380px;
  color: #F4FBFB;
  font-size: var(--fs-17);
  font-weight: 500;
  line-height: 1.5;
}

.auth__points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth__points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .92);
  font-size: var(--fs-14);
  line-height: 1.45;
}

.auth__point-icon {
  box-sizing: content-box;
  width: 18px;
  height: 18px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(32, 38, 38, .28);
  color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  .strength__fill,
  .password-input__toggle {
    transition: none;
  }

  .captcha__refresh.is-spinning .icon {
    animation: none;
  }
}
