/* ---------------- 全局 ---------------- */
body {
  background-color: #f4f6f9;
}

/* ---------------- 登录页 ---------------- */
.login-page {
  background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  border: none;
  border-radius: 1rem;
}

/* ---------------- Dashboard 卡片 ---------------- */
.stat-card {
  border: none;
  border-radius: 0.75rem;
  color: #fff;
}
.stat-card .stat-value {
  font-size: 1.9rem;
  font-weight: 700;
}
.stat-card.thb { background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%); }
.stat-card.cny { background: linear-gradient(135deg, #e74a3b 0%, #a72e21 100%); }

.amount-positive { color: #1cc88a; font-weight: 600; }
.amount-negative { color: #e74a3b; font-weight: 600; }

.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 0.15rem 1rem rgba(0,0,0,0.06);
}

/* ---------------- 图片附件按钮 ---------------- */
.img-slot-group {
  display: flex;
  gap: 6px;
}
.img-slot {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px dashed #c3c8d0;
  border-radius: 0.4rem;
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color .15s, background-color .15s;
}
.img-slot:hover {
  border-color: #4e73df;
}
.img-slot:focus, .img-slot:focus-visible {
  outline: 2px solid #4e73df;
  outline-offset: 1px;
  border-color: #4e73df;
  background: #eef1fb;
}
.img-slot:focus::after {
  content: "可粘贴";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #4e73df;
  white-space: nowrap;
  background: #fff;
  padding: 0 3px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.img-slot.img-slot-dragover {
  border-color: #1cc88a;
  background: #eafaf3;
}
.img-slot.img-slot-loading {
  opacity: .5;
  pointer-events: none;
}
.img-slot-icon {
  color: #b0b6c0;
  font-size: 1.1rem;
}
.img-slot-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}
.img-slot-remove, .img-slot-edit {
  position: absolute;
  top: -2px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 11px;
  border-radius: 50%;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
}
.img-slot-remove { right: -2px; background: #e74a3b; }
.img-slot-edit   { left: -2px; background: #4e73df; }

.img-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.img-lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 0 2rem rgba(0,0,0,.5);
}
.img-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  line-height: 1;
  cursor: pointer;
}

/* ---------------- 表格响应式优化 ---------------- */
@media (max-width: 767.98px) {
  .table-responsive-card thead { display: none; }
  .table-responsive-card tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
  .table-responsive-card tbody td {
    display: flex;
    justify-content: space-between;
    border: none;
    padding: 0.35rem 0;
  }
  .table-responsive-card tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6c757d;
    margin-right: 1rem;
  }
}
