* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8; color: #1f2329; font-size: 14px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #0E7C66; color: #fff; padding: 14px 24px;
}
.logo { font-size: 18px; font-weight: 700; }
.logo span { font-size: 13px; font-weight: 400; opacity: 0.85; margin-left: 6px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.who { font-size: 13px; opacity: 0.9; }
.conn { font-size: 13px; padding: 4px 12px; border-radius: 20px; }
.conn.ok { background: rgba(255,255,255,0.18); }
.conn.bad { background: rgba(255,255,255,0.12); }
.btn-ghost {
  background: rgba(255,255,255,0.16); color: #fff; border: none;
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.26); }

.tabs { display: flex; gap: 8px; padding: 12px 24px 0; background: #fff; border-bottom: 1px solid #edeff2; }
.tab {
  border: none; background: none; padding: 10px 18px; cursor: pointer;
  font-size: 15px; color: #6b7280; border-bottom: 3px solid transparent;
}
.tab.active { color: #0E7C66; font-weight: 600; border-bottom-color: #0E7C66; }

main { padding: 20px 24px; max-width: 1100px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar button {
  background: #0E7C66; color: #fff; border: none; padding: 8px 20px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.toolbar button.btn-sec { background: #e6f4f0; color: #0E7C66; }
.toolbar button.btn-sec:hover { background: #d5ebe5; }
.count { color: #6b7280; font-size: 13px; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid #edeff2; font-size: 14px; }
th { background: #fafbfc; color: #6b7280; font-weight: 600; }
td small { color: #9aa0a6; }
.price { color: #FF7A00; font-weight: 700; }
.empty { text-align: center; color: #9aa0a6; padding: 30px; }
.empty code, .hint code { background: #eef1f3; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; color: #fff; }
.s0 { background: #9aa0a6; }
.s1 { background: #0E7C66; }
.s2 { background: #FF9F1C; }
.s3 { background: #2ea043; }
.mini { background: #e6f4f0; color: #0E7C66; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.mini:hover { background: #d5ebe5; }

.hint { color: #6b7280; font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.cat-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.pcat { background: #fff; padding: 16px 28px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); font-weight: 600; }

.store { background: #fff; padding: 18px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); margin-bottom: 14px; max-width: 420px; }
.sname { font-weight: 700; font-size: 16px; }
.saddr { color: #6b7280; margin: 6px 0; }
.stel { color: #0E7C66; font-size: 13px; }

/* ===== 产品管理 ===== */
.pcat-cat { background: #fff; border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.pcat-cat h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pcat-block { border: 1px solid #edeff2; border-radius: 10px; padding: 12px; margin: 10px 0; }
.pcat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pcat-img { width: 48px; height: 48px; object-fit: contain; background: #f5f6f8; border-radius: 8px; }
.pcat-name { font-weight: 600; }
.up-btn { display: inline-block; cursor: pointer; margin: 0; }
.ptable { margin: 6px 0 10px; }
.ptable input { border: 1px solid #d0d7de; border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.ptable td { padding: 8px 10px; }
.toolbar-add { background: #0E7C66; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; margin-top: 6px; }
#saveProducts { background: #FF7A00; }
#saveProducts:hover { background: #e96f00; }

/* ===== 弹窗表单 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 30, 26, 0.45);
  display: none; align-items: center; justify-content: center; z-index: 900; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal-card {
  background: #fff; border-radius: 14px; padding: 22px 24px; width: 440px; max-width: 100%;
  max-height: 86vh; overflow: auto; box-shadow: 0 16px 48px rgba(0,0,0,0.22); outline: none;
}
.modal-card h3 { font-size: 17px; margin-bottom: 16px; }
.modal-fields { margin-bottom: 4px; }
.mf { display: block; margin-bottom: 14px; }
.mf span { display: block; font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.mf input, .mf select, .mf textarea {
  width: 100%; border: 1px solid #d0d7de; border-radius: 8px;
  padding: 9px 11px; font-size: 14px; font-family: inherit; background: #fff; color: #1f2329;
}
.mf input:focus, .mf select:focus, .mf textarea:focus { outline: none; border-color: #0E7C66; box-shadow: 0 0 0 3px rgba(14,124,102,0.12); }
.mf textarea { resize: vertical; line-height: 1.6; }
.mf small { display: block; color: #9aa0a6; font-size: 12px; margin-top: 5px; line-height: 1.5; }
.modal-err { color: #d93026; font-size: 13px; min-height: 18px; margin-bottom: 10px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-primary {
  background: #0E7C66; color: #fff; border: none; padding: 9px 20px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.btn-primary:hover { background: #0c6b58; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-sec {
  background: #e6f4f0; color: #0E7C66; border: none; padding: 9px 18px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.btn-sec:hover { background: #d5ebe5; }

/* ===== 登录 ===== */
.login-mask {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(140deg, #0E7C66 0%, #0a5c4c 100%);
}
.login-mask.show { display: flex; }
.login-card {
  background: #fff; border-radius: 16px; padding: 30px 30px 24px; width: 380px; max-width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
}
.login-card h2 { font-size: 19px; margin-bottom: 6px; }
.login-card h2 span { font-size: 13px; font-weight: 400; color: #9aa0a6; }
.login-sub { color: #6b7280; font-size: 13px; margin-bottom: 20px; }
.login-err { color: #d93026; font-size: 13px; min-height: 18px; margin-bottom: 10px; }
.login-btn { width: 100%; padding: 11px; font-size: 15px; }
.login-tip { color: #9aa0a6; font-size: 12px; line-height: 1.6; margin-top: 16px; }
.login-tip b { color: #0E7C66; }

/* ===== 工作台 / 用户会员 / 财务 / 营销（biz.js） ===== */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.stat-card {
  background: #fff; border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04); border-left: 4px solid #0E7C66;
}
.stat-card .sv { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.stat-card .sl { font-size: 13px; color: #6b7280; }
.stat-card.c-blue   { border-left-color: #2f7fe0; } .stat-card.c-blue .sv   { color: #2f7fe0; }
.stat-card.c-orange { border-left-color: #FF7A00; } .stat-card.c-orange .sv { color: #FF7A00; }
.stat-card.c-green  { border-left-color: #2ea043; } .stat-card.c-green .sv  { color: #2ea043; }
.stat-card.c-purple { border-left-color: #8250df; } .stat-card.c-purple .sv { color: #8250df; }
.stat-card.c-gray   { border-left-color: #9aa0a6; } .stat-card.c-gray .sv   { color: #6b7280; }

.biz-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .biz-2col { grid-template-columns: 1fr; } }

.biz-box {
  background: #fff; border-radius: 12px; padding: 16px 18px;
  margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.biz-box h4 { font-size: 15px; margin-bottom: 12px; }
.biz-box table { box-shadow: none; border-radius: 8px; }
.biz-box .hint { margin-bottom: 0; }
.biz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.biz-head h4 { margin-bottom: 0; }
.biz-head .btn-sec {
  background: #e6f4f0; color: #0E7C66; border: none;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.biz-head .btn-sec:hover { background: #d5ebe5; }

.mini.danger { background: #fdeceb; color: #d93026; }
.mini.danger:hover { background: #fbd9d7; }
.filter-sel {
  padding: 8px 12px; border-radius: 8px; border: 1px solid #e3e6ea;
  background: #fff; font-size: 14px; color: #1f2329;
}

/* ===== 网站备案页脚 ===== */
.site-footer {
  max-width: 1100px; margin: 28px auto 0; padding: 18px 24px;
  text-align: center; color: #9aa0a6; font-size: 12px; line-height: 1.85;
}
.site-footer p { margin: 3px 0; }
.site-footer .beian a { color: #6b7280; text-decoration: none; }
.site-footer .beian a:hover { color: #0E7C66; text-decoration: underline; }
