* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; background: #f7f8fa; color: #222; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: #ffffff; border-bottom: 1px solid #e6e8eb; }
.brand { font-weight: 600; font-size: 18px; color: #0f172a; }
.upload input[type="file"] { margin-right: 8px; }
.filters { margin-left: auto; }

.layout { display: grid; grid-template-rows: auto 1fr; gap: 16px; padding: 16px 20px; height: calc(100% - 56px); }
.controls { background: #ffffff; border: 1px solid #e6e8eb; border-radius: 8px; padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.field input { width: 100%; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 14px; }
.actions { margin-top: 12px; display: flex; gap: 12px; }
.actions button { padding: 8px 12px; border: 1px solid #d1d5db; background: #0ea5e9; color: white; border-radius: 6px; cursor: pointer; }
.actions button[disabled] { background: #9ca3af; cursor: not-allowed; }

.tablewrap { background: #ffffff; border: 1px solid #e6e8eb; border-radius: 8px; padding: 0; height: 100%; display: flex; flex-direction: column; }
.table { width: 100%; border-collapse: collapse; }

.table thead th { text-align: left; font-weight: 600; color: #374151; padding: 12px; border-bottom: 1px solid #e5e7eb; background: #fafafa; }
.table tbody td { padding: 12px; border-bottom: 1px solid #f0f2f5; color: #111827; font-size: 14px; }
.table tbody tr:hover { background: #f9fafb; }

.pagination { display: flex; align-items: center; gap: 10px; padding: 12px; }
.pagination button { padding: 6px 10px; border: 1px solid #d1d5db; background: #fff; border-radius: 6px; cursor: pointer; }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

.table td.col-preview {
  width: 28%;
}

.table td.col-payurl {
  width: 22%;
}

.table td.col-preview,
.table td.col-payurl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* 处理中遮罩样式 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.overlay.show { display: flex; }
.overlay .box {
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.20);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e5e7eb;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }