textarea#credential {
      resize: vertical;
      height: 80px;
    }

    #historyPopup .popup-box {
      max-width: 500px;
      max-height: 80vh;
      overflow-y: auto;
    }

    #historyList code {
      background: #f0f0f0;
      padding: 2px 6px;
      border-radius: 4px;
      display: inline-block;
      margin-top: 4px;
    }

    .history-button {
      position: fixed;
      top: 20px;
      right: 20px; /* ✅ เปลี่ยนจาก left เป็น right */
      z-index: 999;
      padding: 4px 10px;
      font-size: 12px;
      background: #ffffff;
      color: #2196F3;
      border: 2px solid #2196F3;
      border-radius: 20px;
      cursor: pointer;
    }
    
#userProfile {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  background-color: white;
  border-bottom: 0px solid #ddd;
  border-radius: 0 0 12px 12px; /* ✅ ขอบล่างโค้งมน */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* ✅ เพิ่มเงาให้ดูนุ่มนวล */
}
#userProfile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
}

#userProfile div {
  display: flex;
  flex-direction: column;
}

#userProfile span {
  font-weight: bold;
  color: #2196F3;
  font-size: 14px;
}

#profileBalance {
  font-weight: normal;
  color: #333;
  font-size: 13px;
}

