:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #6b7683;
  --line: #e2e6ea;
  --brand: #7a1f2b;      /* diep bordeaux - vlees/lam */
  --brand-ink: #ffffff;
  --accent: #2e7d32;     /* groen voor bevestigen */
  --danger: #c0392b;
  --warn: #b8860b;
  --radius: 14px;
  --tap: 52px;
  --maxw: 720px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  padding-bottom: calc(var(--tap) + env(safe-area-inset-bottom, 0) + 18px);
}

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

/* Header */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--brand); color: var(--brand-ink);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-top, 0));
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.appbar .title { font-weight: 700; font-size: 18px; flex: 1; }
.appbar a { color: var(--brand-ink); opacity: .9; font-size: 14px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 16px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack > * + * { margin-top: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 16px; font-weight: 600;
  cursor: pointer; width: 100%; text-align: center;
}
.btn.sm { min-height: 40px; width: auto; padding: 0 14px; font-size: 14px; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.go { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn.ghost { background: transparent; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { width: auto; flex: 1; }

/* Big action */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 14px; text-align: center; color: var(--ink); font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 96px;
  justify-content: center;
}
.action .ico { font-size: 26px; }
.action.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.action.full { grid-column: 1 / -1; }

/* Forms */
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 80px; }
.field { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li a, .list li .li-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); min-height: var(--tap);
}
.list li:last-child a, .list li:last-child .li-row { border-bottom: none; }
.list .lead { font-weight: 600; }

/* Delivery line rows */
.line {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px;
  background: #fafbfc;
}
.line .grid-line { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.line .amount { font-weight: 700; margin-top: 6px; }

/* Badges */
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: #eee; color: #444;
}
.badge.concept { background: #eef2f7; color: #445; }
.badge.sent { background: #e6f0fb; color: #1c5fb8; }
.badge.paid { background: #e6f6e9; color: #1f7a34; }
.badge.direct { background: #f3e9ec; color: var(--brand); }
.badge.weekly { background: #fff3e0; color: #a15c00; }
.badge.monthly { background: #ede7f6; color: #5e35b1; }

/* Totals */
.totals { border-top: 2px solid var(--line); margin-top: 10px; padding-top: 10px; }
.totals .row { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-size: 20px; font-weight: 800; }

/* Flash */
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 600; }
.flash.success { background: #e6f6e9; color: #1f7a34; }
.flash.danger { background: #fdecea; color: var(--danger); }
.flash.info { background: #e8f0fe; color: #1c5fb8; }
.flash.warning { background: #fff6e0; color: #8a6100; }

/* Bottom nav */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar a {
  flex: 1; text-align: center; padding: 8px 4px; color: var(--muted);
  font-size: 11px; font-weight: 600; min-height: var(--tap);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.tabbar a.active { color: var(--brand); }
.tabbar .ico { font-size: 20px; }

/* Autocomplete */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  max-height: 220px; overflow-y: auto; box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.ac-list div { padding: 12px; border-bottom: 1px solid var(--line); }
.ac-list div:last-child { border-bottom: none; }
.ac-list div.active, .ac-list div:hover { background: #f3f4f6; }
.hidden { display: none; }

@media (min-width: 560px) {
  .line .grid-line { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* ---------- Publieke website ---------- */
.site { padding-bottom: 0; }
.site-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px calc(12px + env(safe-area-inset-top, 0));
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .brand { font-weight: 800; font-size: 17px; color: var(--brand); display: flex; align-items: center; gap: 7px; }
.site-nav .brand-mark { font-size: 20px; }
.nav-login { width: auto; min-height: 40px; }

.hero {
  background: linear-gradient(150deg, #7a1f2b 0%, #5c141d 60%, #3d0d13 100%);
  color: #fff; padding: 56px 20px 64px;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px;
  font-weight: 700; opacity: .8; margin: 0 0 12px; }
.hero h1 { font-size: 30px; line-height: 1.15; margin: 0 0 14px; font-weight: 800; }
.hero .lead { font-size: 17px; line-height: 1.5; opacity: .95; margin: 0 0 24px; max-width: 46ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta .btn { width: auto; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }

.features {
  max-width: var(--maxw); margin: 0 auto; padding: 36px 18px 8px;
  display: grid; grid-template-columns: 1fr; gap: 14px;
}
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature .f-ico { font-size: 30px; }
.feature h3 { margin: 10px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); }

.about, .assortiment, .contact { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px; }
.about h2, .assortiment h2, .contact h2 { font-size: 22px; margin: 0 0 12px; color: var(--ink); }
.about p { color: #384250; line-height: 1.6; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips span {
  background: #f3e9ec; color: var(--brand); font-weight: 600; font-size: 14px;
  padding: 7px 13px; border-radius: 999px;
}

.contact { background: #fff; border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.contact-grid h4 { margin: 0 0 6px; font-size: 15px; }
.contact-grid p { margin: 0; line-height: 1.6; }
.contact-grid a { font-weight: 600; }

.site-foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  max-width: var(--maxw); margin: 0 auto; padding: 22px 20px 40px;
  color: var(--muted); font-size: 14px;
}

@media (min-width: 640px) {
  .hero { padding: 76px 20px 84px; }
  .hero h1 { font-size: 40px; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}
