.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center vertically */
  width: 100%;
  height: 100vh;
  background-color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-app-region: drag; /* Allow dragging the window */
}

.login-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px; /* Slight visual center adjustment */
}

.login-header {
  margin-bottom: 40px; /* Increased spacing */
}

.login-avatar {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.login-banner {
  width: 280px;
  max-width: calc(100vw - 48px);
  margin: -24px 0 20px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  text-align: center;
}

.login-form {
  width: 280px; /* 稍微加宽一点以容纳验证码按钮 */
  display: flex;
  flex-direction: column;
  gap: 15px; /* Added gap between inputs */
  position: relative; /* 为下拉框定位做准备 */
}

/* Tab 切换样式 */
.login-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
  width: 100%;
}

.tab-item {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  position: relative;
  -webkit-app-region: no-drag;
}

.tab-item.active {
  color: #07c160;
  font-weight: 500;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #07c160;
}

/* 验证码输入框组合 */
.input-with-button {
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-button .login-input {
  flex: 1;
  width: 0; /* Allow input to shrink below its content size if needed */
  min-width: 0;
}

.verify-button {
  font-size: 12px;
  color: #07c160;
  background: none;
  border: 1px solid #07c160;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 10px;
  flex-shrink: 0; /* Prevent button from shrinking */
  -webkit-app-region: no-drag;
}

.verify-button:disabled {
  color: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
}

/* 历史账号下拉列表 */
.history-dropdown {
  position: absolute;
  top: 105px; /* 根据输入框位置调整 */
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-app-region: no-drag;
}

.history-item:hover {
  background-color: #f5f5f5;
}

.history-info {
  display: flex;
  flex-direction: column;
}

.history-mobile {
  font-size: 14px;
  color: #333;
}

.history-delete {
  padding: 4px;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-delete:hover {
  color: #ff4d4f;
  background-color: #fff1f0;
  border-radius: 50%;
}

.toggle-history-btn {
  position: absolute;
  right: 0;
  top: 10px;
  color: #999;
  cursor: pointer;
  z-index: 10;
  -webkit-app-region: no-drag;
}

/* 记住密码复选框 */
.remember-me {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #666;
  margin-top: -5px;
  -webkit-app-region: no-drag;
}

.remember-me input {
  margin-right: 5px;
}

.input-group {
  width: 100%;
  margin-bottom: 0;
  -webkit-app-region: no-drag;
}

.login-input {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  background: transparent;
  font-size: 14px;
  color: #333;
  outline: none;
  border-radius: 0;
  box-sizing: border-box; /* Ensure padding doesn't affect width */
}

.login-input:focus {
  border-bottom-color: #07c160;
}

.login-input::placeholder {
  color: #cccccc;
}

.error-container {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.error-message {
  color: #fa5151;
  font-size: 12px;
}

.login-button {
  margin-top: 10px;
  width: 100%;
  height: 40px;
  background-color: #07c160;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  -webkit-app-region: no-drag;
}

.login-button:hover {
  background-color: #06ad56;
}

.login-button:disabled {
  background-color: #a5d6a5;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.8;
}

.login-footer {
  margin-top: 50px;
  font-size: 12px;
  color: #576b95;
  cursor: pointer;
  width: 100%;
  text-align: center;
  -webkit-app-region: no-drag;
}

.footer-link:hover {
  text-decoration: underline;
}
