/* ============================================================
   居然618 报名 H5 · 样式
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  font-size: 14px;
  color: #222;
  background: #f6f6f8;
  min-height: 100vh;
  padding-bottom: 80px;
}
img { max-width: 100%; display: block; }
button { border: 0; background: none; font-size: inherit; cursor: pointer; }
input { outline: none; border: 0; background: none; font-size: inherit; }
ol { padding-left: 20px; }

/* ---------- Poster (主图) ---------- */
.poster {
  width: 100%;
  line-height: 0;
}
.poster-img {
  width: 100%;
  height: auto;
  display: block;
}
.poster-detail {
  margin: 0 14px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.poster-detail .poster-img {
  border-radius: 12px;
}

/* ---------- Ticket card ---------- */
.ticket-card {
  margin: 14px 14px;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  position: relative;
  overflow: hidden;
  z-index: 2;
}
.ticket-card::before, .ticket-card::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  background: #f6f6f8; border-radius: 50%;
  top: 50%; transform: translateY(-50%);
}
.ticket-card::before { left: -7px; }
.ticket-card::after  { right: -7px; }
.ticket-row { display: flex; align-items: center; gap: 14px; }
.ticket-left { flex: 1; min-width: 0; }
.ticket-name { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 4px; }
.ticket-desc { font-size: 12px; color: #888; line-height: 1.6; }
.ticket-stock { display: inline-block; margin-top: 8px; font-size: 11px; color: #e6541f; background: #fff3ec; padding: 2px 8px; border-radius: 10px; }
.ticket-right { text-align: right; flex-shrink: 0; padding-left: 14px; border-left: 1px dashed #eee; }
.ticket-price { color: #ff3b30; font-weight: 800; font-size: 30px; line-height: 1; }
.ticket-price span { font-size: 16px; font-weight: 600; margin-right: 2px; }
.ticket-sub { margin-top: 6px; font-size: 11px; color: #999; text-decoration: line-through; }

/* ---------- Meta card ---------- */
.meta-card {
  margin: 0 14px 14px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
}
.meta-title { font-size: 17px; font-weight: 700; }
.meta-sub { font-size: 13px; color: #888; margin-top: 6px; }
.meta-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: #555; font-size: 13px; }
.meta-icon { font-size: 15px; }

/* ---------- Section title ---------- */
.section-title { padding: 22px 14px 12px; }
.section-title span { font-size: 16px; font-weight: 700; color: #222; }

/* ---------- Benefits ---------- */
.benefits { padding: 0 14px; display: grid; gap: 12px; }
.benefit {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  border-left: 4px solid #ff5a3c;
}
.benefit.b1 { border-color: #ff5a3c; }
.benefit.b2 { border-color: #ffa600; }
.benefit.b3 { border-color: #1db97e; }
.benefit.b4 { border-color: #d23ce6; }
.benefit-no {
  display: inline-block; font-size: 11px; font-weight: 700; color: #fff;
  background: #ff5a3c; padding: 2px 8px; border-radius: 8px; margin-bottom: 6px;
}
.benefit.b2 .benefit-no { background: #ffa600; }
.benefit.b3 .benefit-no { background: #1db97e; }
.benefit.b4 .benefit-no { background: #d23ce6; }
.benefit-h { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.benefit-d { font-size: 13px; color: #777; line-height: 1.6; }

/* ---------- Agenda ---------- */
.agenda { padding: 0 14px; display: grid; gap: 10px; }
.agenda-item {
  background: #fff; border-radius: 12px; padding: 12px 14px;
  display: flex; gap: 14px; align-items: center;
}
.agenda-date {
  width: 56px; flex-shrink: 0;
  text-align: center;
  background: linear-gradient(135deg, #ff5a3c, #ff8761); color: #fff;
  border-radius: 10px; padding: 8px 0; font-weight: 700; font-size: 14px;
}
.agenda-h { font-size: 14px; font-weight: 700; }
.agenda-d { font-size: 12px; color: #888; margin-top: 4px; line-height: 1.5; }

/* ---------- Notice ---------- */
.notice {
  margin: 0 14px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}
.notice li { padding-left: 2px; }

.footer-space { height: 30px; }

/* ---------- Fixed pay bar ---------- */
.pay-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff; padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.pay-bar-info { flex: 1; min-width: 0; }
.pay-bar-price { color: #ff3b30; font-weight: 800; font-size: 22px; line-height: 1; }
.pay-bar-tip { color: #999; font-size: 11px; margin-top: 4px; }
.pay-bar-btn {
  flex-shrink: 0;
  height: 44px; padding: 0 28px;
  background: linear-gradient(135deg, #ff5a3c, #ff2e1f);
  color: #fff; font-size: 16px; font-weight: 700;
  border-radius: 22px;
  box-shadow: 0 4px 12px rgba(255,46,31,.35);
}
.pay-bar-btn:active { transform: scale(.96); }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end;
  animation: maskIn .2s;
}
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 100%; background: #fff;
  border-radius: 18px 18px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  animation: modalIn .25s cubic-bezier(.2,.8,.3,1);
}
@keyframes modalIn { from { transform: translateY(100%) } to { transform: translateY(0) } }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; font-size: 16px; font-weight: 700;
  border-bottom: 1px solid #f1f1f1;
}
.modal-close { font-size: 22px; color: #aaa; padding: 0 6px; cursor: pointer; }
.modal-body { padding: 18px; }
.form-row { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f4f4f4; }
.form-row label { width: 70px; flex-shrink: 0; color: #333; font-size: 14px; }
.form-row input { flex: 1; font-size: 15px; padding: 4px 0; color: #222; }
.form-tip { font-size: 12px; color: #999; margin: 14px 0 18px; line-height: 1.6; }
.modal-btn {
  width: 100%; height: 46px; border-radius: 23px;
  background: linear-gradient(135deg, #ff5a3c, #ff2e1f);
  color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(255,46,31,.35);
}
.modal-btn:disabled { opacity: .55; }
.modal-btn:active { transform: scale(.98); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.78); color: #fff;
  padding: 10px 18px; border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  display: none;
  max-width: 80%;
  text-align: center;
}

/* ---------- WeChat-only tip ---------- */
.wechat-only {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 0 24px;
  background: #f6f6f8;
}
.wechat-only .card {
  background: #fff; border-radius: 16px; padding: 36px 24px;
  text-align: center;
}
.wechat-only h3 { margin: 16px 0 8px; font-size: 18px; }
.wechat-only p { color: #666; line-height: 1.7; font-size: 14px; }

/* =====================================================
   电子门票页
   ===================================================== */
.ticket-page { background: #f6f6f8; padding: 14px 0; padding-bottom: 30px; }
.ticket-pad { padding: 0 14px; }
.ticket-box {
  background: linear-gradient(160deg, #ff5a3c 0%, #ff8761 100%);
  border-radius: 16px;
  padding: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ticket-box.used::after {
  content: '已核销';
  position: absolute; top: 60px; right: -40px;
  background: rgba(0,0,0,.55); color: #fff;
  padding: 6px 50px; transform: rotate(35deg);
  font-weight: 700; letter-spacing: 4px;
}
.tk-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.tk-brand { font-size: 13px; opacity: .9; }
.tk-status {
  background: rgba(255,255,255,.22);
  padding: 2px 10px; border-radius: 10px; font-size: 12px;
}
.tk-title { font-size: 19px; font-weight: 700; }
.tk-sub { font-size: 12px; opacity: .85; margin-top: 4px; }

.tk-info {
  margin: 18px 0;
  background: rgba(255,255,255,.13);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid; gap: 8px;
}
.tk-info > div { display: flex; justify-content: space-between; font-size: 13px; }
.tk-info span { opacity: .85; }
.tk-info b { font-weight: 600; }

.tk-qr-wrap {
  background: #fff; border-radius: 12px; padding: 18px; text-align: center;
  color: #222;
}
#qrcode { display: inline-block; }
#qrcode img, #qrcode canvas { display: inline-block; }
.tk-code { margin-top: 12px; font-size: 13px; color: #555; }
.tk-code b { color: #ff3b30; font-size: 16px; letter-spacing: 2px; margin-left: 4px; }
.tk-tip { color: #999; font-size: 12px; margin-top: 4px; }

.tk-foot { margin-top: 14px; font-size: 11px; opacity: .8; text-align: center; }

.tk-actions { margin-top: 18px; text-align: center; }
.tk-actions button {
  background: #fff; padding: 12px 32px; border-radius: 22px;
  color: #ff5a3c; font-weight: 700; font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ============= 后台 admin ============= */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 18px; background: #f6f7fb; min-height: 100vh; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-header h1 { font-size: 20px; font-weight: 700; }
.admin-nav { display: flex; gap: 10px; }
.admin-nav a { padding: 6px 14px; background: #fff; border-radius: 6px; text-decoration: none; color: #333; font-size: 13px; border: 1px solid #e8e8ee; }
.admin-nav a.active { background: #ff5a3c; color: #fff; border-color: #ff5a3c; }
.admin-card { background: #fff; border-radius: 8px; padding: 18px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.admin-stat { background: #fff; padding: 16px; border-radius: 8px; }
.admin-stat-label { color: #888; font-size: 12px; }
.admin-stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; color: #222; }
.admin-stat-value.up { color: #ff5a3c; }
.admin-stat-value.ok { color: #1db97e; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 8px; border-bottom: 1px solid #f0f0f4; text-align: left; }
.admin-table th { background: #fafafd; color: #666; font-weight: 600; }
.admin-table tr:hover td { background: #fbfbfd; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.tag-paid    { background: #e6f7ee; color: #1db97e; }
.tag-unpaid  { background: #fff3ec; color: #ff8a00; }
.tag-checkin { background: #e8efff; color: #2a6cff; }
.tag-no      { background: #f1f1f4; color: #888; }
.admin-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-form input, .admin-form select {
  padding: 7px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; background: #fff;
}
.admin-form button {
  padding: 7px 18px; background: #ff5a3c; color: #fff; border-radius: 6px; font-size: 13px;
}
.admin-form .btn-secondary { background: #fff; color: #ff5a3c; border: 1px solid #ff5a3c; }
.pager { padding: 16px 0; text-align: center; }
.pager a, .pager span { display: inline-block; padding: 6px 12px; margin: 0 2px; border-radius: 4px; text-decoration: none; color: #333; background: #fff; border: 1px solid #eee; font-size: 13px; }
.pager .current { background: #ff5a3c; color: #fff; border-color: #ff5a3c; }

/* 登录页 */
.login-bg { min-height: 100vh; background: linear-gradient(135deg, #ff5a3c, #ff8761); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 100%; max-width: 360px; background: #fff; border-radius: 12px; padding: 32px 26px; }
.login-box h2 { text-align: center; font-size: 20px; margin-bottom: 22px; }
.login-box .field { margin-bottom: 14px; }
.login-box label { display: block; font-size: 12px; color: #888; margin-bottom: 6px; }
.login-box input { width: 100%; padding: 11px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.login-box button { width: 100%; padding: 11px; background: #ff5a3c; color: #fff; border-radius: 6px; font-size: 14px; font-weight: 600; margin-top: 8px; }
.login-err { color: #ff3b30; font-size: 12px; text-align: center; margin-bottom: 12px; min-height: 16px; }

/* 核销页 */
.checkin-result { max-width: 480px; margin: 40px auto; padding: 30px 24px; background: #fff; border-radius: 12px; text-align: center; }
.checkin-result h2 { margin-bottom: 16px; }
.checkin-ok h2 { color: #1db97e; }
.checkin-no h2 { color: #ff3b30; }
.checkin-info { text-align: left; background: #f7f8fb; padding: 14px; border-radius: 8px; margin: 16px 0; font-size: 13px; line-height: 1.9; }
.checkin-result button { margin-top: 12px; padding: 10px 26px; background: #ff5a3c; color: #fff; border-radius: 22px; font-weight: 600; }
