:root {
  --cream: #fef7df;
  --yellow: #f7d661;
  --yellow-soft: #fbe9a8;
  --ink: #2c3323;
  --ink-soft: rgba(44, 51, 35, .65);
  --line: rgba(44, 51, 35, .18);
  --white: #fffdf6;
  --red: #b3412c;
  --green: #4f6b2f;
  --radius: 14px;
  --font: sofia-pro, "Outfit", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--cream); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.6;
  display: flex; flex-direction: column;
}
a { color: inherit; }
main { flex: 1; width: 100%; margin: 0 auto; padding: 32px 16px 48px; }
main.narrow { max-width: 460px; }
main.wide { max-width: 1100px; }
main.center { max-width: 460px; text-align: center; }

/* Typografie in Wolly-stijl: kleine hoofdletters */
.caps, .label, label, th, .btn, .tag, .nav a, .foot { text-transform: uppercase; letter-spacing: .04em; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; font-weight: 700; }
h1 { font-size: 28px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin-top: 28px; }
p { margin: 0 0 14px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }

/* Merk */
.brand { text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.wordmark { font-weight: 700; font-size: 28px; letter-spacing: -.03em; line-height: 1; }
.brand-big { margin: 8px auto 24px; }
.brand-big .wordmark { font-size: 56px; }
.logo-art { width: 130px; height: auto; }
.intro { text-align: center; margin-bottom: 28px; }
.intro p { text-transform: uppercase; font-size: 14px; letter-spacing: .02em; }

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--cream);
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand { flex-direction: row; }
.tag { font-size: 11px; background: var(--yellow); padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; margin-left: auto; font-size: 12px; }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--yellow); }
.badge { background: var(--red); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }

/* Formulieren */
form { margin: 0; }
.field { margin-bottom: 16px; text-align: left; }
label, .label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; margin-bottom: 12px; text-align: left; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none;
  background: var(--yellow); color: var(--ink); border: 1.5px solid var(--yellow);
  border-radius: 999px; padding: 13px 24px; min-height: 48px;
}
.btn:hover { background: #f3cb3c; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: var(--ink); }
.btn-ghost:hover { background: var(--yellow-soft); }
.btn-small { min-height: 34px; padding: 6px 14px; font-size: 11px; }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; }

/* Kaarten / panelen */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-bottom: 18px; }
.panel-yellow { background: var(--yellow); border-color: var(--yellow); }
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 600; }
.flash-ok { background: #e3ebcf; color: var(--green); }
.flash-err { background: #f6dcd5; color: var(--red); }
.flash-warn { background: var(--yellow-soft); }

/* Klantkaart */
.loyalty-card {
  background: var(--yellow); border-radius: 26px; padding: 26px 22px 22px; text-align: center;
  box-shadow: 0 10px 30px rgba(44, 51, 35, .12); margin-bottom: 22px;
}
.loyalty-card .who { text-transform: uppercase; font-size: 13px; letter-spacing: .05em; margin-bottom: 4px; }
.loyalty-card .pts { font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.loyalty-card .pts-label { text-transform: uppercase; font-size: 12px; letter-spacing: .08em; margin-bottom: 18px; }
.qr-box { background: #fff; border-radius: 18px; padding: 16px; display: inline-block; }
.qr-box svg { display: block; width: 220px; height: 220px; }
.code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .12em; font-size: 15px; margin-top: 12px; }
.progress { height: 10px; background: rgba(44, 51, 35, .12); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progress span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.reward-list { list-style: none; padding: 0; margin: 0; }
.reward-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.reward-list li:last-child { border: 0; }
.reward-list .ok { font-weight: 700; }

/* Scanner */
#reader { width: 100%; border-radius: 20px; overflow: hidden; background: #000; min-height: 280px; }
#reader video { object-fit: cover; }
.scan-hint { text-align: center; margin: 12px 0 20px; }
.big-amount input { font-size: 34px; font-weight: 700; text-align: center; padding: 16px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.keypad button { font: inherit; font-size: 22px; font-weight: 600; min-height: 58px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.keypad button:active { background: var(--yellow-soft); }
.customer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.customer-head .pts { font-size: 34px; font-weight: 700; line-height: 1; }

/* Tabellen en statistiek */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.stat .n { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
.pill { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--yellow-soft); }
.pill-off { background: #e8e4d6; color: var(--ink-soft); }
.pill-red { background: #f6dcd5; color: var(--red); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar .field { margin: 0; flex: 1; min-width: 160px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.chart .bar { flex: 1; background: var(--yellow); border-radius: 6px 6px 0 0; min-height: 2px; position: relative; }
.chart-labels { display: flex; gap: 4px; font-size: 10px; color: var(--ink-soft); }
.chart-labels span { flex: 1; text-align: center; }

.foot {
  background: var(--yellow); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); font-size: 12px;
}
.foot a { text-decoration: none; }
@media (max-width: 560px) {
  .foot { flex-direction: column; align-items: center; text-align: center; }
  .nav { margin-left: 0; width: 100%; }
  h1 { font-size: 24px; }
}
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* Wallet-knoppen */
.wallet-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: -4px 0 22px; }
.wallet-btn { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; text-decoration: none;
  border-radius: 12px; padding: 8px 18px 8px 14px; min-height: 52px; line-height: 1.1; font-weight: 600; font-size: 17px; }
.wallet-btn small { display: block; font-size: 11px; font-weight: 400; opacity: .85; }
.wallet-ico { font-size: 26px; font-weight: 700; font-family: -apple-system, system-ui, sans-serif; }
