/* 财务模块专用样式命名空间 */
.finance-module {
  font-family: 'Arial', sans-serif;
  color: #333;
}

/* 表单容器 */
.finance-module #form-container {
  position: fixed;
  top: 0;
  right: -100%;
  width: 400px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  transition: right 0.3s ease;
  z-index: 1000;
  border-radius: 8px 0 0 8px;
  box-sizing: border-box;
}

.finance-module #form-container.show {
  right: 0;
}

.finance-module form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.finance-module .form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.finance-module form label {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  width: 30%;
}

.finance-module form input,
.finance-module form textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  width: 65%;
  background-color: #f9f9f9;
}
.finance-module form select {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  width: 75%;
  background-color: #f9f9f9;
}
.finance-module form input:focus,
.finance-module form textarea:focus,
.finance-module form select:focus {
  border-color: #4CAF50;
  outline: none;
}

.finance-module form button {
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 16px;
  font-weight: 600;
  padding: 12px;
  border-radius: 8px;
}

.finance-module form button:hover {
  background-color: #45a049;
}

.finance-module form button:disabled {
  background-color: #ddd;
  cursor: not-allowed;
}

.finance-module #cancel-btn {
  background-color: #f44336;
}

.finance-module #cancel-btn:hover {
  background-color: #e53935;
}

.finance-module #addBtn {
  background-color: #4CAF50;
  color: white;
  padding: 4px 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.finance-module #addBtn:hover {
  background-color: #45a049;
}

/* 表格样式 */
.finance-module table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.finance-module table th,
.finance-module table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.finance-module table th {
  background-color: #f2f2f2;
  font-weight: 600;
  color: #444;
}

.finance-module table td {
  font-size: 14px;
}

.finance-module table td button {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
}

.finance-module table td button.edit-btn {
  background-color: #4CAF50;
  color: white;
}

.finance-module table td button.delete-btn {
  background-color: #f44336;
  color: white;
}

.finance-module table td button:hover {
  opacity: 0.8;
}

/* 自动补全建议 */
.finance-module #client-list,
.finance-module #payee-list {
  position: absolute;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  width: 100%;
  background-color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  border-radius: 4px;
}

.finance-module #client-list li,
.finance-module #payee-list li {
  padding: 12px;
  cursor: pointer;
}

.finance-module #client-list li:hover,
.finance-module #payee-list li:hover {
  background-color: #f0f0f0;
}

/* 消息框 */
.finance-module .message-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  z-index: 1002;
  display: none;
  font-size: 16px;
}

.finance-module .message-box.success {
  background-color: #4CAF50;
}

.finance-module .message-box.error {
  background-color: #f44336;
}
