/* 暖阳渐变风格 - 营收分红管理系统 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  min-height: 100vh;
  padding: 30px 20px;
  color: #4a3728;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 28px 30px;
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* 余额卡片居中 */
.balance-card {
  text-align: center;
}

h2, h3 {
  color: #5c3d2e;
  margin-bottom: 16px;
  font-weight: 600;
}

.balance {
  font-size: 36px;
  font-weight: 700;
  color: #d35400;
  margin: 12px 0 6px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  color: #8b6914;
  font-weight: 500;
}

input[type="number"] {
  width: 160px;
  padding: 12px 14px;
  border: 1px solid #f0d9b5;
  border-radius: 14px;
  font-size: 16px;
  background: #fffaf3;
  color: #4a3728;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="number"]:focus {
  outline: none;
  border-color: #e67e22;
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

input[type="number"]::placeholder {
  color: #c0a78b;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

button:active {
  transform: scale(0.98);
}

.btn-revenue {
  background: #27ae60;
  color: white;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-revenue:hover {
  background: #219a52;
  box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.btn-dividend {
  background: #e67e22;
  color: white;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.btn-dividend:hover {
  background: #cf6d17;
  box-shadow: 0 6px 16px rgba(230, 126, 34, 0.4);
}

.btn-delete {
  background: #fff0e6;
  color: #c0392b;
  border: 1px solid #f5c6aa;
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 10px;
  font-weight: 500;
}

.btn-delete:hover {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

th, td {
  padding: 12px 8px;
  border-bottom: 1px solid #fae3d9;
  text-align: center;
}

th {
  background: #fef5e7;
  color: #7d5a50;
  font-weight: 600;
}

tr:hover td {
  background: rgba(255, 245, 235, 0.6);
}

.msg {
  color: #27ae60;
  font-weight: 500;
  margin-top: 10px;
  font-size: 14px;
}

.hint {
  color: #b08d6a;
  font-size: 14px;
  margin-top: 4px;
}

.pre-show {
  font-size: 18px;
  font-weight: 600;
  padding: 12px 0;
  color: #d35400;
}

/* 通用备注输入框 */
.note-input {
  width: 200px;
  padding: 12px 14px;
  border: 1px solid #f0d9b5;
  border-radius: 14px;
  font-size: 15px;
  background: #fffaf3;
  color: #4a3728;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.note-input:focus {
  outline: none;
  border-color: #e67e22;
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

/* 自定义确认框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.8);
  max-width: 360px;
  width: 90%;
  text-align: center;
}

.modal-box p {
  font-size: 16px;
  color: #5c3d2e;
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-buttons button {
  padding: 10px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-cancel {
  background: #f0d9b5;
  color: #5c3d2e;
}

.btn-cancel:hover {
  background: #e7cba1;
}

.btn-confirm {
  background: #e74c3c;
  color: white;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-confirm:hover {
  background: #c0392b;
  box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 备注内联编辑 */
.note-cell {
  max-width: 140px;
  position: relative;
}

.note-text {
  display: inline-block;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.edit-note-input {
  width: 110px;
  padding: 6px 8px;
  border: 1px solid #f0d9b5;
  border-radius: 10px;
  font-size: 14px;
  background: #fffaf3;
  color: #4a3728;
  vertical-align: middle;
}

.edit-note-input:focus {
  outline: none;
  border-color: #e67e22;
  box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.15);
}

.btn-save-note, .btn-cancel-note {
  padding: 4px 10px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
  vertical-align: middle;
}

.btn-save-note {
  background: #27ae60;
  color: white;
}

.btn-save-note:hover {
  background: #219a52;
}

.btn-cancel-note {
  background: #bdc3c7;
  color: #2d3436;
}

.btn-cancel-note:hover {
  background: #95a5a6;
}

.btn-edit-note {
  background: #f39c12;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
}

.btn-edit-note:hover {
  background: #e67e22;
}

td .btn-delete {
  margin-left: 4px;
}