* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #111827, #334155);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #172033;
}
.phone-shell {
  width: min(430px, 100vw);
  height: min(932px, 100vh);
  background: #f6f7fb;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  position: relative;
  border: 8px solid #0f172a;
}
#app { height: calc(100% - 72px); overflow-y: auto; padding-bottom: 20px; }
.page { padding: 22px 18px; }
.hero {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  padding: 24px 20px;
  border-radius: 26px;
  box-shadow: 0 14px 32px rgba(37,99,235,.28);
}
.hero h1 { margin: 0 0 8px; font-size: 24px; }
.hero p { margin: 0; opacity: .86; }
.card {
  background: white;
  border-radius: 22px;
  padding: 18px;
  margin-top: 16px;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.toolbar { display:flex; gap:10px; align-items:center; }
.toolbar .input { flex:1; }
.toolbar .ghost { margin-top:10px; white-space:nowrap; }
.stat { background: rgba(255,255,255,.16); padding: 14px; border-radius: 18px; }
.stat strong { display:block; font-size: 24px; margin-bottom: 4px; }
.stat-button { border:0; color:white; text-align:left; font:inherit; cursor:pointer; }
.stat-button:active { transform: scale(.98); }
.action {
  border: 0;
  border-radius: 20px;
  padding: 18px 12px;
  background: white;
  color: #172033;
  text-align: left;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  font-size: 15px;
}
.action span { display:block; font-size: 26px; margin-bottom: 8px; }
.section-title { font-size: 18px; margin: 22px 0 12px; }
.input, select, textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  font-size: 15px;
  margin-top: 10px;
  background: #fff;
}
.primary {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 15px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-size: 16px;
  margin-top: 16px;
}
.ghost {
  border: 1px solid #dbe3ef;
  background: white;
  border-radius: 14px;
  padding: 10px 12px;
}
.ghost.danger { color:#dc2626; border-color:#fecaca; background:#fff1f2; }
.list-item { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:14px 0; border-bottom:1px solid #edf2f7; }
.list-item:last-child { border-bottom:0; }
.row-actions { display:flex; align-items:center; gap:8px; }
.tag { padding: 5px 9px; border-radius: 999px; font-size: 12px; background:#eff6ff; color:#2563eb; white-space:nowrap; }
.tag.used { background:#ecfdf5; color:#059669; }
.tag.expired { background:#fff7ed; color:#ea580c; }
.scan-box {
  height: 260px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0f172a, #334155);
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}
.scan-frame { width: 170px; height: 170px; border: 3px solid #60a5fa; border-radius: 20px; position:relative; }
.scan-frame::after { content:""; position:absolute; left:12px; right:12px; top:50%; height:2px; background:#22c55e; box-shadow:0 0 14px #22c55e; }
.tabbar {
  height: 72px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.96);
  border-top: 1px solid #e5e7eb;
}
.tabbar button { border:0; background:transparent; color:#64748b; font-size:13px; }
.tabbar button.active { color:#2563eb; font-weight:700; }
.login { height:100%; display:flex; flex-direction:column; justify-content:center; padding:26px; }
.logo { width:64px; height:64px; border-radius:20px; display:grid; place-items:center; color:white; font-size:30px; background:linear-gradient(135deg,#2563eb,#7c3aed); }
.muted { color:#64748b; font-size:13px; }
.qr { width: 132px; height:132px; background: repeating-linear-gradient(45deg,#111827 0 8px,#fff 8px 16px); border:10px solid white; box-shadow:0 8px 24px rgba(0,0,0,.12); border-radius:12px; }
.claim-body { display:block; background:#f6f7fb; color:#172033; }
.claim-page { min-height:100vh; padding:18px; max-width:520px; margin:0 auto; }
.claim-hero { background:linear-gradient(135deg,#ef4444,#f97316); color:white; border-radius:28px; padding:28px 22px; box-shadow:0 16px 38px rgba(239,68,68,.24); }
.claim-hero.success { background:linear-gradient(135deg,#16a34a,#22c55e); }
.claim-hero p { margin:0 0 8px; opacity:.9; }
.claim-hero h1 { margin:0 0 12px; font-size:28px; }
.claim-hero strong { font-size:18px; }
.claim-card { background:white; border-radius:24px; padding:20px; margin-top:16px; box-shadow:0 12px 32px rgba(15,23,42,.08); }
.claim-logo { width:64px; height:64px; border-radius:20px; display:grid; place-items:center; color:white; font-size:30px; background:linear-gradient(135deg,#ef4444,#f97316); }
.claim-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:16px; }
.claim-stats div { background:#f8fafc; border-radius:18px; padding:14px; text-align:center; }
.claim-stats strong { display:block; font-size:24px; color:#ef4444; }
.claim-stats span { color:#64748b; font-size:12px; }
.error-text { color:#b91c1c; background:#fff1f2; border:1px solid #fecaca; padding:12px; border-radius:14px; }
.coupon-card { text-align:center; }
.coupon-code { font-size:34px; font-weight:800; letter-spacing:4px; margin:12px 0; color:#111827; }
.big-qr { width:170px; height:170px; margin:12px 0; }
.staff-share-card { display:flex; gap:14px; align-items:center; text-align:left; padding:14px 0; border-bottom:1px solid #edf2f7; }
.staff-share-card:last-child { border-bottom:0; }
.staff-share-qr { width:96px; height:96px; flex:0 0 96px; border-radius:16px; background:#fff; display:grid; place-items:center; box-shadow:0 8px 20px rgba(15,23,42,.08); }
.staff-share-qr img { width:82px; height:82px; display:block; }
.staff-share-info { flex:1; min-width:0; }
.real-qr { border:12px solid white; border-radius:18px; box-shadow:0 10px 28px rgba(15,23,42,.12); background:white; }
.coupon-real-qr { width:240px; height:240px; max-width:100%; margin:10px 0 6px; }
.large-real-qr { width:260px; height:260px; max-width:100%; }