:root {
  /* Huisstijl pureperfection.nl */
  --bg: #f7f7f7;
  --surface: #ffffff;
  --ink: #33373d;
  --muted: #7a7a7a;
  --line: #e6e2d8;
  --accent: #cc9933;
  --accent-soft: #f5ecd9;
  --gold: #cc9933;
  --cta: #61ce70;
  --radius: 6px;
  --shadow: 0 2px 14px rgba(0, 0, 0, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
h1, h2, h3 { font-family: Adamina, Georgia, serif; font-weight: 400; margin: 0; color: #54595f; }
h1 { font-size: 26px; }
h2 { font-size: 22px; }
.wordmark { font-family: "Yeseva One", Georgia, serif; color: var(--gold); text-transform: uppercase; letter-spacing: .02em; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.brand .wordmark { font-size: 22px; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 18px; }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; font-size: 18px; color: var(--ink);
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-family: Adamina, serif; color: var(--gold); }
.stat span { font-size: 12px; color: var(--muted); }

.search {
  width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); font: inherit; margin-bottom: 12px; outline: none;
}
.search:focus { border-color: var(--accent); }

.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow);
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 600;
}
.row .info { flex: 1; min-width: 0; }
.row .name { font-weight: 600; }
.row .sub { font-size: 13px; color: var(--muted); }
.bar { height: 5px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px;
  background: var(--accent-soft); color: #94701f; white-space: nowrap;
}
.empty { text-align: center; color: var(--muted); padding: 32px 0; }

.fab {
  position: fixed; right: max(16px, calc(50% - 264px)); bottom: 24px;
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 99px;
  box-shadow: 0 10px 30px rgba(51, 55, 61, .3); font-family: Adamina, serif;
}

.card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0 6px; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line);
  display: grid; place-items: center; font-size: 20px; color: var(--line);
  transition: transform .25s, background .25s;
}
.stamp.on { border: 0; background: var(--accent); color: #fff; }
.stamp { font-family: Adamina, serif; font-size: 16px; }
.stamp.reward { border-color: var(--gold); color: var(--gold); }
.stamp.reward.on { background: var(--gold); color: #fff; }
.stamp.pop { animation: pop .45s ease; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.progress-text { text-align: center; color: var(--muted); font-size: 14px; }

.btn {
  display: block; width: 100%; padding: 15px; border-radius: 14px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 16px;
}
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.gold { background: var(--gold); }
.btn.cta { background: var(--cta); }
.btn { font-family: Adamina, serif; letter-spacing: .02em; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.btn.small { padding: 11px; font-size: 14px; }

.reward-banner {
  background: var(--accent-soft); border: 1px solid #ead8b0; border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center;
}
.reward-banner .txt { flex: 1; }
.reward-banner b { display: block; }
.reward-banner .btn { width: auto; padding: 10px 14px; font-size: 14px; }

.history { list-style: none; margin: 8px 0 0; padding: 0; }
.history li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.history li:last-child { border: 0; }
.history .when { color: var(--muted); }

.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  font: inherit; background: #fff; outline: none;
}
.field input:focus { border-color: var(--accent); }

.share { text-align: center; }
.share #qr { display: inline-block; padding: 12px; background: #fff; border-radius: 12px; margin: 10px 0; }
.share code { display: block; font-size: 12px; word-break: break-all; color: var(--muted); margin-bottom: 10px; }

/* Inloggen */
.login-head { text-align: center; margin: 24px 0 20px; }
.login-head img { height: 72px; width: auto; }
.login-head .wordmark { font-size: 26px; margin-top: 6px; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* Klantweergave */
.loyalty {
  position: relative; overflow: hidden;
  background: #fff; color: var(--ink);
  border-radius: 14px; padding: 24px 20px; box-shadow: 0 14px 40px rgba(0, 0, 0, .1);
  border-top: 4px solid var(--gold); margin-top: 12px;
}
.loyalty .mandala {
  position: absolute; right: -10px; top: -40px; height: 260px; opacity: .14; pointer-events: none;
}
.loyalty > *:not(.mandala) { position: relative; }
.loyalty .wordmark { font-size: 20px; }
.loyalty .tagline { font-family: Adamina, serif; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.loyalty h1 { font-size: 26px; }
.loyalty .reward-line { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.client-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.demo-tag {
  display: inline-block; font-size: 11px; background: var(--ink); color: #fff;
  padding: 3px 8px; border-radius: 99px; margin-bottom: 8px;
}

#toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px;
  opacity: 0; transition: .25s; pointer-events: none; font-size: 14px;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
