* { box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0;
  background: #f5f7fb;
  color: #1f2937;
  line-height: 1.6;
}
a { color: inherit; }

/* 导航 */
nav {
  background: #fff;
  padding: 14px 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}
nav a { text-decoration: none; color: #07c160; font-size: 14px; }
nav a:hover { opacity: .75; }

main { max-width: 1080px; margin: 0 auto; padding: 0 20px 40px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #07c160 0%, #0ea5e9 100%);
  color: #fff;
  border-radius: 18px;
  padding: 56px 32px;
  margin: 28px 0;
  text-align: center;
  box-shadow: 0 12px 30px rgba(7,193,96,.25);
}
.hero h1 { font-size: 34px; margin: 0 0 12px; letter-spacing: 1px; }
.hero .sub { font-size: 15px; opacity: .92; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .2s;
}
.btn.primary { background: #07c160; color: #fff; }
.btn.primary:hover { background: #06ad56; }
.btn.ghost { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.6); }
.btn.ghost:hover { background: rgba(255,255,255,.25); }
.btn.danger { background: #ef4444; }
.btn.danger:hover { background: #dc2626; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.full {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 20px;
}

/* 功能海报 */
.posters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 36px 0;
}
.poster {
  background: #fff;
  border-radius: 14px;
  padding: 26px 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  transition: transform .2s, box-shadow .2s;
}
.poster:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.poster .icon { font-size: 30px; margin-bottom: 10px; }
.poster h3 { margin: 0 0 8px; font-size: 17px; }
.poster p { margin: 0; font-size: 13px; color: #6b7280; }

/* 套餐 */
.plans-section { margin: 48px 0; text-align: center; }
.plans-section h2 { font-size: 24px; margin-bottom: 4px; }
.section-sub { color: #9ca3af; font-size: 13px; margin-bottom: 28px; }
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.plan {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 28px 20px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  transition: transform .2s, box-shadow .2s;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,.09); }
.plan.hot { border: 2px solid #07c160; }
.plan .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #07c160; color: #fff; font-size: 12px;
  padding: 3px 12px; border-radius: 20px;
}
.plan h3 { margin: 0 0 12px; font-size: 18px; }
.plan .price { font-size: 30px; color: #07c160; font-weight: 700; }
.plan .price span { font-size: 16px; margin-right: 2px; }
.plan .duration { color: #6b7280; font-size: 13px; margin: 6px 0 14px; }
.plan .features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: 13px;
  color: #4b5563;
  flex: 1;
}
.plan .features li { padding: 4px 0; }

/* 统计条 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  background: #fff;
  border-radius: 14px;
  padding: 26px 18px;
  margin: 40px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  text-align: center;
}
.stats div strong { display: block; font-size: 24px; color: #07c160; }
.stats div span { font-size: 13px; color: #6b7280; }
.stats-admin { margin: 0 0 28px; }

/* 页脚 */
.site-footer {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  padding: 24px 0 10px;
  border-top: 1px solid #e5e7eb;
  margin-top: 30px;
}

/* 表单与表格基础 */
input, select, button, textarea {
  padding: 8px 12px;
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
button { background: #07c160; color: #fff; border: none; cursor: pointer; }
button:hover { background: #06ad56; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid #f0f0f0; padding: 10px; font-size: 13px; text-align: left; }
th { background: #f9fafb; }

/* === 后台页面样式 === */
.page-head { margin: 28px 0 20px; }
.page-head h1 { margin: 0; font-size: 26px; }
.page-sub { margin: 4px 0 0; color: #9ca3af; font-size: 13px; }

.info-bar {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 14px;
  padding: 18px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  margin-bottom: 24px;
}
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-item .label { font-size: 12px; color: #9ca3af; }
.info-item .value { font-size: 15px; font-weight: 600; }
.badge-plan {
  display: inline-block;
  background: #e8f8ef;
  color: #07c160;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 13px;
}

.card-block {
  background: #fff;
  border-radius: 14px;
  padding: 22px 24px 26px;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  margin-bottom: 22px;
}
.card-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-block-head h3 { margin: 0; font-size: 17px; }
.card-block-head .tip { font-size: 12px; color: #9ca3af; }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #4b5563; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid label span { font-size: 12px; color: #6b7280; }
.form-grid .switch-row { flex-direction: row; align-items: center; gap: 8px; }
.form-grid .switch-row input { width: auto; }

.qr-preview { margin-top: 16px; text-align: center; }
.qr-preview img { width: 160px; border-radius: 10px; border: 1px solid #eee; }
.qr-preview .muted, .muted { color: #9ca3af; font-size: 12px; margin: 6px 0 0; }

.link-box { display: flex; gap: 10px; align-items: center; }
.link-box input { flex: 1; background: #f9fafb; }

.badge-role {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: #f3f4f6;
  color: #4b5563;
}
.badge-role.admin { background: #fef3c7; color: #b45309; }

.table-wrap { overflow-x: auto; border-radius: 10px; }
.op-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select { padding: 5px 8px; font-size: 13px; }

/* 重新生成链接区块 */
.regen-box {
  margin-top: 18px;
  padding: 16px 18px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.regen-box strong { font-size: 14px; color: #9a3412; }
.regen-box .muted { margin: 4px 0 0; }
.regen-box form { margin: 0; }