:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #10213f;
  --muted: #64748b;
  --blue: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --cyan: #0891b2;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -20%, #cfe1ff 0%, rgba(207, 225, 255, 0) 34%),
    radial-gradient(circle at 90% -10%, #d1fae5 0%, rgba(209, 250, 229, 0) 28%),
    var(--bg);
}

a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }

.review-wrap { max-width: 1860px; margin: 0 auto; padding: 20px 16px 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }

.review-hero h1 { margin: 0; font-size: 34px; color: #0b2a57; }
.review-hero p { margin: 10px 0 14px; color: #516076; line-height: 1.8; }

.hero-pills, .row-pills, .btn-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}
.pill-blue { background: #dbeafe; color: #1d4ed8; }
.pill-green { background: #dcfce7; color: #166534; }
.pill-amber { background: #fef3c7; color: #92400e; }
.pill-cyan { background: #cffafe; color: #0e7490; }
.pill-gray { background: #e2e8f0; color: #334155; }

.review-grid { display: grid; grid-template-columns: 460px 1fr; gap: 16px; margin: 16px 0; }
.panel { padding: 18px; }
.panel h2 { margin: 0 0 12px; font-size: 22px; }

.form-row { margin-bottom: 12px; }
.form-row label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
input, select {
  width: 100%;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
}
input:focus, select:focus { outline: none; border-color: #74a3ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

.btn-primary, .btn-light, .btn-success, .btn-mini {
  border: none;
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-light { background: #eef2f7; color: #1e293b; }
.btn-success { background: #dcfce7; color: #166534; }
.btn-mini { padding: 7px 10px; }
.btn-save { background: #e2e8f0; color: #334155; border: none; border-radius: 10px; }
.btn-save.saved { background: #dbeafe; color: #1d4ed8; }

.tip { color: var(--muted); font-size: 13px; }
.error { color: var(--danger); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.stat-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.stat-box span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.stat-box b { font-size: 23px; color: var(--green); }

.trend-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.trend-wrap h3 { margin: 0 0 8px; font-size: 14px; color: #334155; }
#trendCanvas { width: 100%; height: 220px; border-radius: 10px; border: 1px solid #e2e8f0; }

.table-panel { padding: 14px; margin-bottom: 14px; }
.table-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.table-header h2 { margin: 0; font-size: 22px; }
.inline-check { font-size: 13px; color: #334155; display: inline-flex; align-items: center; gap: 4px; }
.inline-check input { width: 8px; height: 8px; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.table-scroll.sticky { max-height: 72vh; overflow-y: auto; overflow-x: auto; }
.table-scroll.sticky thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f1f5f9;
  box-shadow: 0 1px 0 var(--line);
}

.review-table, .result-table { width: 100%; border-collapse: collapse; }
.review-table th, .review-table td, .result-table th, .result-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}
.review-table th, .result-table th { background: #f1f5f9; font-weight: 800; white-space: nowrap; }
.review-table td input { min-width: 86px; height: 34px; }
.review-table th.sortable { cursor: pointer; user-select: none; }
.review-table th.sortable:hover { background: #e2e8f0; }
.sort-ind { color: var(--blue); margin-left: 4px; font-weight: 900; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-input { height: 34px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 13px; width: 180px; background: #fff; }
.filter-input.short { width: 120px; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 4px 4px; }
.pagination .filter-input.short { width: 80px; }
.pagination select { width: 100px; height: 34px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 8px; background: #fff; }

.btn-danger { background: #fee2e2; color: #b91c1c; border: none; border-radius: 10px; padding: 7px 10px; cursor: pointer; font-weight: 700; }
.btn-danger:hover { background: #fecaca; }
.btn-uploaded { background: #dcfce7; color: #16a34a; cursor: not-allowed; opacity: 0.8; border: none; border-radius: 10px; padding: 7px 10px; font-weight: 700; }

.actions-cell { white-space: nowrap; min-width: 160px; }
.actions-cell button { margin-right: 4px; }
.weight-cell { min-width: 120px; }

.row-check { width: 6px; height: 6px; transform: scale(1); cursor: pointer; }
.cell-hint { margin-top: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }

.sku-main { font-weight: 800; margin-bottom: 4px; }
.img-cell { min-width: 92px; }
.img-cell img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #dbe3ee; }
.url-cell { min-width: 70px; }
.links-cell { min-width: 120px; }
.link-item { display: block; margin-bottom: 4px; font-size: 12px; }

.money { white-space: nowrap; font-weight: 700; }
.conf-wrap b { display: block; margin-bottom: 4px; }
.conf-bar { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; min-width: 84px; }
.conf-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #22c55e); }

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

@media (max-width: 760px) {
  .review-wrap { padding: 10px; }
  .review-hero h1 { font-size: 28px; }
}

/* === B4 前端重构新增样式 === */
.tab-bar { margin-top: 12px; display: flex; gap: 4px; border-bottom: 2px solid var(--line); }
.tab-btn {
  padding: 10px 24px; background: transparent; border: none; border-bottom: 3px solid transparent;
  cursor: pointer; font-size: 15px; font-weight: 500; color: var(--muted); transition: all 0.2s;
}
.tab-btn:hover { color: var(--text); background: rgba(37,99,235,0.04); }
.tab-btn.tab-active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

.shop-switch-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.shop-switch-row label { font-weight: 500; min-width: 80px; }
.shop-switch-row select { min-width: 280px; }

.shop-edit-panel { margin-top: 12px; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: #fafbfd; }
.shop-edit-panel summary { cursor: pointer; font-weight: 500; color: var(--blue); padding: 6px; user-select: none; }
.shop-edit-panel summary:hover { color: var(--text); }
.shop-edit-panel[open] summary { margin-bottom: 10px; }

.pill-red { background: #fee2e2; color: #b91c1c; }


/* 上架完成按钮 - 灰绿色不可点击 */
.btn-uploaded-pending {
  background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7;
  cursor: not-allowed; opacity: 0.85; font-size: 12px; padding: 4px 10px;
  border-radius: 6px; white-space: nowrap;
}
.btn-uploaded-pending:hover { background: #d1fae5; }

