:root {
  --bg: #0B0F1A;
  --bg-2: #0F1422;
  --surface: #141A2A;
  --surface-2: #1A2236;
  --line: rgba(245, 247, 251, 0.08);
  --line-2: rgba(245, 247, 251, 0.14);
  --text: #F5F7FB;
  --muted: #8A94A8;
  --accent: #22D3EE;
  --accent-deep: #0891B2;
  --accent-glow: rgba(34, 211, 238, 0.35);
  --reward: #34D399;
  --reward-glow: rgba(52, 211, 153, 0.35);
  --danger: #F87171;
  --radius: 18px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 85% -10%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(700px 480px at -10% 30%, rgba(14, 116, 144, 0.12), transparent 60%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}
.topbar .brand img { height: 34px; width: auto; }
.topbar .tagline {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .01em;
  text-align: right;
}

/* Type */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 9vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
}
h1 .hl {
  background: linear-gradient(100deg, #67E8F9 0%, var(--accent) 45%, #0EA5E9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.lead {
  margin: 0;
  font-size: 17px;
  color: #B7C0D1;
  max-width: 34ch;
}
.muted { color: var(--muted); }

/* ---------- Signup ---------- */
.hero {
  display: grid;
  gap: 28px;
  padding: 18px 0 48px;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 64px;
    padding: 48px 0 80px;
  }
}

.explainer {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  max-width: 460px;
}
.explainer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.explainer p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.explainer p strong { color: var(--text); font-weight: 600; }
.explainer .plus {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 0 2px;
}

/* Stamp dots (shared by explainer, pass, staff) */
.stamp {
  --size: 38px;
  flex: 0 0 auto;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(34, 211, 238, 0.45);
  color: var(--bg);
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.stamp svg { width: 52%; height: 52%; opacity: 0; transition: opacity .2s; }
.stamp.on {
  background: radial-gradient(circle at 35% 30%, #7DEBFB, var(--accent) 55%, var(--accent-deep));
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .12), 0 0 16px var(--accent-glow);
}
.stamp.on svg { opacity: 1; }
.stamp.gift {
  border: 2px dashed rgba(52, 211, 153, .55);
  color: var(--reward);
}
.stamp.gift svg { opacity: 1; width: 48%; height: 48%; }
.stamp.gift.on {
  background: radial-gradient(circle at 35% 30%, #86EFAC, var(--reward) 60%, #059669);
  border: 2px solid transparent;
  color: var(--bg);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .14), 0 0 18px var(--reward-glow);
}

/* Form card */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(34, 211, 238, .45), transparent 35%, transparent 70%, rgba(34, 211, 238, .15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
@media (min-width: 600px) { .card { padding: 32px; } }

.card-head { margin-bottom: 20px; }
.card-head p { margin: 0; font-size: 14px; color: var(--muted); }

.field { display: block; margin-bottom: 14px; }
.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #C4CBD8;
}
.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(11, 15, 26, .7);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: #5B6478; }
.field input:focus {
  border-color: var(--accent);
  background: rgba(11, 15, 26, .95);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .14);
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0 22px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.consent input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 7px;
  border: 1.5px solid var(--line-2);
  background: rgba(11, 15, 26, .7);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.consent input::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid var(--bg);
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg) scale(0);
  transition: transform .18s var(--ease);
}
.consent input:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.consent input:checked::after { transform: translateY(-1px) rotate(45deg) scale(1); }
.consent input:focus-visible { box-shadow: 0 0 0 4px rgba(34, 211, 238, .2); }
.consent a { color: #C4CBD8; text-decoration: underline; text-underline-offset: 2px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), filter .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  width: 100%;
  color: #04202A;
  background: linear-gradient(180deg, #5EEAFB, var(--accent) 55%, #12B8D4);
  box-shadow: 0 10px 30px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn-primary:hover { box-shadow: 0 14px 38px -8px rgba(34, 211, 238, .55), inset 0 1px 0 rgba(255,255,255,.45); filter: brightness(1.04); }
.btn-primary[disabled] { opacity: .7; cursor: progress; }
.btn-primary svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn-primary:hover svg { transform: translateX(3px); }

.fineprint {
  margin: 14px 0 0;
  font-size: 12px;
  color: #6B7489;
  text-align: center;
}

.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: #B7C0D1;
}
.perks li { display: flex; align-items: center; gap: 8px; }
.perks svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- Card page ---------- */
.ready {
  display: grid;
  gap: 32px;
  padding: 8px 0 40px;
}
@media (min-width: 900px) {
  .ready {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 72px;
    align-items: start;
    padding: 40px 0 64px;
  }
  .ready .pass-col { order: 2; position: sticky; top: 32px; }
  .ready .info-col { order: 1; padding-top: 24px; }
}
.ready h1 { font-size: clamp(30px, 8vw, 52px); }
/* Mobile: the real card goes into Wallet, so the preview is desktop-only and the wallet button is the main action. */
@media (max-width: 899px) {
  .ready .pass-col { display: none; }
  .ready { padding-top: 24px; }
  .ready .wallet-buttons { max-width: none; margin-top: 24px; }
  .ready .wallet-item:first-child .wallet-btn { height: 64px; }
  .ready .wallet-item:first-child .wallet-btn .txt b { font-size: 19px; }
  .ready .section-title { margin-top: 48px; }
}

.pass-col { display: flex; justify-content: center; }

.pass {
  position: relative;
  width: 100%;
  max-width: 360px;
  border-radius: 20px;
  background: #0B0F1A;
  color: var(--text);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .07),
    0 40px 80px -30px rgba(0, 0, 0, .9),
    0 0 80px -20px rgba(34, 211, 238, .28);
  animation: passIn .7s var(--ease) both;
}
@keyframes passIn {
  from { opacity: 0; transform: translateY(18px) rotateX(8deg) scale(.98); }
  to { opacity: 1; transform: none; }
}
.pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
}
.pass-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.pass-logo img { width: 30px; height: 30px; }
.pass-field { text-align: right; }
.pass-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.pass-value { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; }
.pass-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 20px 16px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(34, 211, 238, .16), transparent 60%),
    linear-gradient(180deg, #121A2D, #0E1424);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.pass-strip .slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pass-strip .stamp { --size: clamp(34px, 10vw, 42px); }
.pass-strip .slot small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--reward);
}
.pass-strip .slot small.num { color: var(--muted); font-weight: 600; }
.pass-fields {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 18px 4px;
}
.pass-fields .pass-value { font-size: 16px; font-weight: 500; }
.pass-fields .pass-field:first-child { text-align: left; min-width: 0; }
.pass-fields .pass-field:first-child .pass-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pass-aux { padding: 10px 18px 0; font-size: 13px; color: #B7C0D1; }
.pass-aux.reward { color: var(--reward); font-weight: 600; }
.pass-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 18px 24px;
}
.qr-box {
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  width: 152px;
  height: 152px;
}
.qr-box canvas, .qr-box img { width: 132px !important; height: 132px !important; }
.qr-fallback {
  width: 132px; height: 132px;
  display: grid; place-items: center;
  color: #0B0F1A; font-size: 11px; text-align: center;
}
.pass-qr .alt { font-size: 12px; color: var(--muted); letter-spacing: .14em; font-variant-numeric: tabular-nums; }

/* Wallet buttons */
.wallet-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 28px 0 0;
  max-width: 380px;
}
.wallet-item { display: flex; flex-direction: column; gap: 6px; }
.wallet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  border-radius: 14px;
  color: #fff;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .22);
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.wallet-btn:hover { border-color: rgba(255, 255, 255, .45); box-shadow: 0 10px 30px -10px rgba(0,0,0,.8), 0 0 0 4px rgba(255,255,255,.04); }
.wallet-btn:active { transform: scale(.985); }
.wallet-btn .txt { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.wallet-btn .txt small { font-size: 11px; font-weight: 500; opacity: .85; }
.wallet-btn .txt b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.wallet-btn.google { background: #1F1F1F; border-color: rgba(255,255,255,.16); }
.wallet-btn svg { flex: 0 0 auto; }
.wallet-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6B7489;
  padding-left: 4px;
}
.wallet-note::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #F59E0B;
  opacity: .8;
}
.wallet-note[hidden] { display: none; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 14px 8px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.share-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.share-btn:active { transform: scale(.985); }
.share-btn svg { width: 18px; height: 18px; }

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}
.steps h2 { margin-bottom: 4px; }
.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(20, 26, 42, .55);
}
.step::before {
  counter-increment: s;
  content: counter(s);
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 700;
  color: var(--accent);
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .25);
}
.step b { display: block; font-size: 15px; margin-bottom: 2px; }
.step span { font-size: 14px; color: var(--muted); }

.section-title { margin: 44px 0 14px; }

/* ---------- Staff ---------- */
.staff-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 18px;
}
.staff-head h1 { font-size: clamp(30px, 7vw, 42px); margin: 6px 0 0; }
.staff-count { font-size: 14px; color: var(--muted); }

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  color: #C4CBD8;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(34, 211, 238, .09), rgba(34, 211, 238, .02));
  border: 1px solid rgba(34, 211, 238, .22);
}
.notice svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }

.search {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 10px 0;
}
.search label { position: relative; display: block; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 46px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  outline: none;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .8);
  transition: border-color .2s, box-shadow .2s;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(34, 211, 238, .14); }

.customers { display: grid; gap: 10px; padding: 6px 0 48px; }
@media (min-width: 900px) { .customers { grid-template-columns: 1fr 1fr; } }

.cust {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .25s, box-shadow .25s;
}
.cust.ready-reward { border-color: rgba(52, 211, 153, .45); box-shadow: 0 0 0 1px rgba(52, 211, 153, .12), 0 0 30px -12px var(--reward-glow); }
.cust-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cust-name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.cust-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.cust-id {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.cust-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; align-items: center; }
.dots .stamp { --size: 26px; border-width: 1.5px; }
.dots .stamp.gift { margin-left: 4px; }
.cust-actions { display: flex; gap: 8px; }
.btn-sm {
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 12px;
}
.btn-stamp {
  color: #04202A;
  background: linear-gradient(180deg, #5EEAFB, var(--accent));
  box-shadow: 0 6px 18px -8px var(--accent-glow);
}
.btn-stamp[disabled] { opacity: .35; cursor: not-allowed; box-shadow: none; }
.btn-redeem {
  color: #052E1F;
  background: linear-gradient(180deg, #6EE7B7, var(--reward));
  box-shadow: 0 6px 18px -6px var(--reward-glow);
  animation: pop .35s var(--ease);
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.cust-foot { font-size: 12px; color: #6B7489; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  background: #1F2A40;
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: #6B7489;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

.fade-up { animation: fadeUp .6s var(--ease) both; }
.fade-up.d1 { animation-delay: .06s; }
.fade-up.d2 { animation-delay: .12s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Signup (form only) ---------- */
.signup-only {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 16px;
}
.signup-only .signup-logo { height: 40px; }
.signup-only .card { width: 100%; max-width: 420px; }
.signup-only form { display: flex; flex-direction: column; gap: 16px; }
.signup-only .btn { width: 100%; }
.signup-only .field, .signup-only .consent { margin: 0; }
.signup-only .consent { margin-top: 4px; }
.signup-only .btn { margin-top: 6px; }

/* Form validation */
.error { display: block; min-height: 0; font-size: 13px; color: var(--danger); }
.error:empty { display: none; }
.field .error { margin-top: 6px; }
.field.invalid input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }
.consent.invalid input { border-color: var(--danger); }
#err-consent { margin-top: -8px; padding-left: 34px; }
