.ft-password-field {
  position: relative;
  display: block;
  width: 100%;
}
.ft-password-field > input {
  padding-inline-end: 48px !important;
  width: 100%;
}
.ft-password-toggle {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
}
.ft-password-toggle:hover,
.ft-password-toggle:focus-visible {
  color: #1b4f8a;
  background: #eef5fc;
  outline: none;
}
.ft-password-toggle:active {
  transform: translateY(-50%) scale(0.96);
}
.ft-password-toggle .d-none { display: none !important; }
.ft-password-toggle svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* Hide native browser reveal icons that steal taps */
.ft-password-field input::-ms-reveal,
.ft-password-field input::-ms-clear {
  display: none;
}
.ft-password-field input::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
}

@media (max-width: 640px) {
  .ft-password-field > input {
    padding-inline-end: 52px !important;
    min-height: 48px;
    font-size: 16px; /* avoid iOS zoom */
  }
  .ft-password-toggle {
    width: 44px;
    height: 44px;
    inset-inline-end: 2px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #1b4f8a;
  }
  .ft-password-toggle svg {
    width: 22px;
    height: 22px;
  }
}
