.portal-email-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.portal-email-fields[hidden],
.portal-email-fields [hidden],
#account-recovery-dialog [hidden],
#account-recovery-open[hidden],
#profile-email-form[hidden],
#profile-email-form [hidden],
#recovery-email-toggle[hidden] {
  display: none;
}
.portal-email-fields input,
.portal-email-fields .portal-email-send {
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #dbe6f7;
  border-radius: 12px;
  font: inherit;
}
.portal-email-fields input {
  min-width: 0;
  width: 100%;
  padding: 8px 11px;
  color: #223551;
  background: #fff;
}
.portal-email-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.portal-email-send,
.portal-email-link {
  padding: 8px 12px;
  color: #2056b1;
  background: #edf4ff;
  border: 1px solid #d7e6ff;
  border-radius: 12px;
  cursor: pointer;
}
.portal-email-fields button:disabled {
  opacity: .62;
  cursor: wait;
}
.portal-auth .auth-support-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.portal-auth .auth-support-row .security-note {
  min-width: 0;
  margin: 0;
  padding-inline: 8px;
  text-align: left;
}
#account-recovery-open {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 9px;
  font-size: 13px;
  white-space: nowrap;
}
#account-recovery-dialog {
  width: min(400px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  text-align: left;
}
.portal-email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.portal-email-actions button {
  flex: 1 1 105px;
}
#account-recovery-dialog .portal-email-link {
  color: #2056b1;
  background: #edf4ff;
}
#account-recovery-dialog #recovery-login {
  flex: 1 1 auto;
  text-align: center;
  text-decoration: none;
  font-weight: 650;
}
#account-recovery-dialog [data-email-result] {
  font-weight: 700;
  overflow-wrap: anywhere;
}
#profile-sheet-security .recovery-email-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
#profile-sheet-security #recovery-email-toggle {
  flex: none;
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid #d7e6ff;
  background: #edf4ff;
  color: #2056b1;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
#recovery-email-mask {
  overflow-wrap: anywhere;
}
#profile-email-form {
  margin-top: 12px;
}
#profile-email-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

#register-email-section:not([hidden]) {
  display: block;
}
#register-email-section input {
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
}
#register-email-section .portal-email-code-row {
  align-items: center;
  gap: 6px;
}
#register-email-section .portal-email-send {
  min-height: 44px;
  padding: 4px clamp(5px, 2vw, 10px);
  border-radius: 10px;
  background: #e6efff;
  color: #215bc3;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
#register-email-section .portal-email-send:focus-visible {
  outline: 2px solid #367dff;
  outline-offset: 2px;
}
