/* 企微活码后台样式 */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #f4f6f9;
  color: #1f2329;
  font-size: 14px;
  line-height: 1.6;
}
a { color: #1a73e8; text-decoration: none; }
code {
  background: #f2f3f5;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: Menlo, Consolas, monospace;
  font-size: 12px;
}

/* 顶栏 */
.topbar {
  background: #fff;
  border-bottom: 1px solid #e6e9ee;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-size: 16px; font-weight: 600; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 6px 12px;
  border-radius: 6px;
  color: #4e5969;
  font-size: 13px;
}
.nav a.on { background: #e8f8ef; color: #07a35a; font-weight: 600; }
.nav a.quit { color: #8a919f; }

.wrap { max-width: 920px; margin: 0 auto; padding: 20px 16px 40px; }
.foot { text-align: center; color: #a9b0bb; font-size: 12px; padding: 10px 0 30px; }

/* 卡片 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(31, 35, 41, .06);
}
.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-hd h2 { font-size: 15px; margin: 0; font-weight: 600; }
.sub { color: #8a919f; font-weight: 400; font-size: 13px; }

/* 统计 */
.stat-row { display: flex; gap: 12px; margin-bottom: 16px; }
.stat-row.small .num { font-size: 18px; }
.stat {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(31, 35, 41, .06);
}
.stat .num { font-size: 24px; font-weight: 600; color: #07a35a; line-height: 1.2; }
.stat .lab { color: #8a919f; font-size: 12px; margin-top: 2px; }

/* 表格 */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  color: #8a919f;
  font-weight: 500;
  padding: 8px 10px;
  border-bottom: 1px solid #eceff3;
  white-space: nowrap;
}
.tbl td { padding: 10px; border-bottom: 1px solid #f5f6f8; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .right { text-align: right; }
.nowrap { white-space: nowrap; }
.err-text { color: #e34d59; font-size: 12px; }

.tag {
  display: inline-block;
  background: #eef3ff;
  color: #2b5fd9;
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 12px;
}
.ok { color: #07a35a; font-weight: 600; }
.bad { color: #e34d59; font-weight: 600; }

/* 按钮 */
.btn {
  display: inline-block;
  background: #07c160;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: #06ad56; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.xs { padding: 4px 10px; font-size: 12px; }
.btn.ghost { background: #fff; color: #4e5969; border: 1px solid #dfe3e8; }
.btn.ghost:hover { border-color: #07c160; color: #07a35a; }
.btn.danger { color: #e34d59; border-color: #f5c2c6; }
.btn.full { width: 100%; }
.btn-row { display: flex; gap: 10px; margin-top: 6px; }
.btn-row .btn { flex: 1; }

/* 表单 */
.form .field { margin-bottom: 16px; }
.form label { display: block; font-weight: 500; margin-bottom: 6px; }
.form input[type=text], .form input:not([type]), .form input[type=password], .form textarea, .form select {
  width: 100%;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1f2329;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: #07c160; }
.hint { color: #8a919f; font-size: 12px; margin-top: 5px; }
.field.checkbox label { font-weight: 400; display: flex; align-items: center; gap: 6px; }
.field.readonly input { background: #f7f8fa; }

/* 提示 */
.msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.msg.ok { background: #e8f8ef; color: #07a35a; }
.msg.err { background: #fdecee; color: #e34d59; }

/* 二维码 */
.qr-box { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.qr { width: 190px; height: 190px; border-radius: 8px; border: 1px solid #eceff3; background: #fff; }
.qr-actions { display: flex; flex-direction: column; gap: 10px; }

/* 空状态 */
.empty { text-align: center; padding: 28px 10px; color: #4e5969; }
.empty .hint { margin-top: 8px; word-break: break-all; }

/* 步骤 */
.steps { margin: 0; padding-left: 20px; color: #4e5969; font-size: 13px; }
.steps li { margin-bottom: 8px; }

/* 分页 & 危险区 */
.pager { display: flex; align-items: center; gap: 12px; justify-content: center; padding-top: 14px; }
.danger-zone { border-top: 1px dashed #eceff3; margin-top: 16px; padding-top: 14px; }

/* 登录页 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f4f6f9; }
.login-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 6px 28px rgba(31, 35, 41, .08);
  margin: 0 16px;
}
.login-title { font-size: 20px; font-weight: 600; }
.login-sub { color: #8a919f; font-size: 12px; margin: 4px 0 20px; }
.login-card input {
  width: 100%;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  margin-bottom: 14px;
}
.login-card input:focus { outline: none; border-color: #07c160; }

/* 手机适配 */
@media (max-width: 640px) {
  .stat-row { flex-wrap: wrap; }
  .stat { min-width: 46%; }
  .qr-box { justify-content: center; }
  .tbl th, .tbl td { padding: 8px 6px; }
}
