:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1d2433; --muted: #6b7280; --line: #e5e7eb;
  --brand: #2453d4; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: #111827; color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 52px; }
header.top .brand { font-weight: 600; font-size: 15px; white-space: nowrap; }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
header.top nav a { color: #d1d5db; padding: 6px 10px; border-radius: 6px; }
header.top nav a.on, header.top nav a:hover { background: #374151; color: #fff; text-decoration: none; }
header.top .me { display: flex; gap: 12px; align-items: center; color: #9ca3af; white-space: nowrap; }
header.top .me button { background: none; border: 1px solid #4b5563; color: #d1d5db; padding: 3px 10px; }
.mockbar { background: #fef3c7; color: #92400e; padding: 6px 24px; font-size: 13px; }
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 24px 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 24px; font-weight: 600; }
.stat.warn .value { color: var(--warn); }
.stat.bad .value { color: var(--bad); }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; background: #fafafa; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tablewrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; margin-bottom: 16px; }
.tablewrap table { border: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; background: #eef2ff; color: #3730a3; }
.badge.waiting { background: #f3f4f6; color: #374151; }
.badge.held { background: #fef3c7; color: #92400e; }
.badge.charged { background: #e0e7ff; color: #3730a3; }
.badge.released { background: #dbeafe; color: #1e40af; }
.badge.shipped { background: #dcfce7; color: #166534; }
.badge.cancelled { background: #f3f4f6; color: #6b7280; }
.badge.bypassed, .badge.attn { background: #fee2e2; color: #991b1b; }
form.inline { display: inline; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: var(--ink); min-width: 0; }
textarea { width: 100%; }
button, .btn { font: inherit; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; display: inline-block; }
button.secondary, .btn.secondary { background: #fff; color: var(--brand); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.small { padding: 2px 10px; font-size: 12px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.flash.ok { background: #dcfce7; color: #166534; }
.flash.error { background: #fee2e2; color: #991b1b; }
.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.pager { display: flex; gap: 12px; margin: 8px 0 24px; }
.login { max-width: 360px; margin: 10vh auto; }
.login input { width: 100%; margin-bottom: 12px; }
.login button { width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } header.top { flex-wrap: wrap; height: auto; padding: 8px 16px; } main { padding: 16px; } }
code { background: #f3f4f6; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* 选品中心 */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-bottom: 24px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.pcard .img { aspect-ratio: 1 / 1; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pcard .img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pcard .img .ph { color: #9ca3af; font-size: 13px; text-align: center; padding: 16px; }
.pcard .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .title { font-weight: 600; line-height: 1.4; }
.pcard .price { font-size: 18px; font-weight: 600; }
.pcard .stock { display: flex; gap: 6px; flex-wrap: wrap; }
.pcard .stock span { background: #f3f4f6; border-radius: 6px; padding: 1px 8px; font-size: 12px; }
.pcard .stock span.zero { color: #9ca3af; }
.pcard.out { opacity: .6; }
.thumb { width: 48px; height: 48px; object-fit: contain; background: #f3f4f6; border-radius: 6px; display: block; }
.thumb.ph { display: flex; align-items: center; justify-content: center; font-size: 11px; color: #9ca3af; }
