* { box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  margin: 0; color: #222; background: #fafafa;
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; background: #1f2937; color: #fff;
}
header a { color: #e5e7eb; text-decoration: none; margin-right: 14px; }
header a:hover { color: #fff; }
.brand { font-weight: 700; font-size: 18px; }
.who { color: #9ca3af; margin-right: 14px; }
main { max-width: 1100px; margin: 24px auto; padding: 0 20px; }
h1 { font-size: 22px; }
h2 { font-size: 16px; margin-top: 24px; border-bottom: 1px solid #eee; padding-bottom: 6px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
th, td { border: 1px solid #e5e7eb; padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: #f3f4f6; }
.mono { font-family: Consolas, monospace; font-size: 12px; }
.muted { color: #6b7280; font-size: 13px; }
.empty { text-align: center; color: #9ca3af; padding: 24px; }
.error { color: #b91c1c; background: #fee2e2; padding: 8px 12px; border-radius: 4px; }
.actions { margin-top: 16px; }
.inline { display: inline-block; }
.btn, button {
  display: inline-block; border: 1px solid #d1d5db; background: #fff; color: #374151;
  padding: 6px 12px; border-radius: 4px; font-size: 13px; cursor: pointer; text-decoration: none;
  margin: 2px;
}
.btn.small, button.small { padding: 3px 8px; font-size: 12px; }
.btn.primary, button.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
button.danger, .btn.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
button.link { background: none; border: none; color: #e5e7eb; cursor: pointer; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.cards { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 16px 20px; min-width: 140px;
}
.card .num { font-size: 26px; font-weight: 700; display: block; }
.card span { font-size: 13px; color: #6b7280; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #e5e7eb; }
.tag-ready, .tag-published, .tag-succeeded, .tag-completed { background: #dcfce7; color: #166534; }
.tag-validating, .tag-processing, .tag-running, .tag-released, .tag-downloaded { background: #dbeafe; color: #1e40af; }
.tag-validation_failed, .tag-failed, .tag-void, .tag-cancelled { background: #fee2e2; color: #991b1b; }
.tag-uploading, .tag-pending, .tag-queued, .tag-scheduled, .tag-publishing { background: #fef9c3; color: #854d0e; }
.product-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 14px 16px; margin-bottom: 14px; }
.product-card h2 { border: none; margin-top: 0; }
form label { display: block; margin: 10px 0 4px; font-size: 14px; }
input[type=text], input[type=password], input[type=date] {
  padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 4px; width: 260px;
}
.narrow { max-width: 340px; }
.platforms label { display: inline-block; margin-right: 10px; }
.fail-form input[type=text] { width: 220px; }
.upload-box { background: #fff; border: 1px dashed #d1d5db; border-radius: 8px; padding: 24px; }
.bar { height: 10px; background: #e5e7eb; border-radius: 5px; margin-top: 10px; overflow: hidden; display: none; }
.bar .fill { height: 100%; width: 0; background: #2563eb; transition: width 0.2s; }

/* ---------------- 前台傻瓜发布台 ---------------- */
.helper-bar { display: flex; align-items: center; gap: 10px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; margin-bottom: 18px; }
.helper-bar[data-state="offline"] { background: #fef2f2; border-color: #fecaca; }
.helper-bar[data-state="syncing"] { background: #eff6ff; border-color: #bfdbfe; }
.helper-bar[data-state="ready"] { background: #f0fdf4; border-color: #bbf7d0; }
.helper-bar[data-state="error"] { background: #fef2f2; border-color: #fecaca; }
.helper-icon { width: 12px; height: 12px; border-radius: 50%; background: #9ca3af; flex: none; }
.helper-icon.on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.2); }
.helper-icon.off { background: #ef4444; }
.helper-progress { flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; max-width: 240px; }
.helper-progress-fill { height: 100%; background: #2563eb; transition: width 0.4s; }
.pub-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; margin-bottom: 18px; overflow: hidden; }
.pub-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; flex-wrap: wrap; }
.pub-platform { font-weight: 700; font-size: 16px; background: #dbeafe; color: #1e40af; border-radius: 6px; padding: 3px 10px; }
.pub-name { font-weight: 600; }
.pub-body { display: flex; gap: 16px; padding: 14px 16px; flex-wrap: wrap; }
.pub-cover { flex: none; width: 140px; height: 180px; background: #f3f4f6; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid #e5e7eb; }
.pub-cover img { width: 100%; height: 100%; object-fit: cover; }
.pub-cover .no-cover { color: #9ca3af; font-size: 13px; }
.pub-text { flex: 1; min-width: 260px; }
.pub-title { font-size: 15px; font-weight: 700; color: #111827; margin-bottom: 6px; white-space: pre-wrap; }
.pub-desc { font-size: 13px; color: #374151; white-space: pre-wrap; line-height: 1.6; }
.pub-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pub-foot { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-top: 1px solid #e5e7eb; background: #fcfcfd; flex-wrap: wrap; }
.pub-foot .fail-form { display: none; }
.pub-foot .fail-form input { width: 220px; }
/* ---------------- 上传页规范提示 ---------------- */
.spec-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 14px 16px; margin-top: 18px; }
.spec-box h3 { margin-top: 0; font-size: 14px; }
.spec-box pre { background: #fff; border: 1px solid #fde68a; border-radius: 6px; padding: 10px 12px; font-size: 12px; line-height: 1.5; }
.spec-box ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; }
.spec-box code { background: #fef3c7; border-radius: 3px; padding: 1px 4px; }
.auto-release-box { margin-top: 16px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px 14px; }
.auto-release-toggle { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.auto-release-platforms { display: flex; gap: 12px; margin: 8px 0 4px; }
.plat-check { font-size: 13px; display: flex; align-items: center; gap: 4px; }
