/* Huisstijl Huize Pony: crème en linnen als basis, umber voor knoppen en labels,
   terracotta als één accent per scherm. Vlakke kleuren, ronde hoeken, geen harde schaduwen. */
:root {
  --creme: #F8F3EA;
  --linnen: #EFE6D8;
  --sandy: #E6D3B3;
  --umber: #8A7262;
  --umber-diep: #6B5547;
  --inkt: #3D2E25;
  --terracotta: #9C4F43;
  --walnoot: #6E4329;
  --haaggroen: #5F7457;
  --salie: #B7C7AE;
  --roos: #E7BFB4;
  --wit: #FFFFFF;
  --font-kop: 'Bricolage Grotesque', 'Figtree', sans-serif;
  --font-tekst: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--creme); color: var(--inkt); }
body {
  font: 16px/1.5 var(--font-tekst);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--umber-diep); }
a:hover { color: var(--inkt); }
h1, h2, h3 { font-family: var(--font-kop); font-weight: 600; letter-spacing: -0.01em; }

/* Kopbalk met beeldmerk */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: var(--wit);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand svg { flex: none; display: block; }
.brand .naam { font-family: var(--font-kop); font-weight: 600; font-size: 18px; white-space: nowrap; }
.brand .streep { width: 2px; height: 20px; background: var(--sandy); flex: none; }
.brand .app { font-size: 16px; font-weight: 500; color: var(--umber-diep); white-space: nowrap; }

main { padding: 20px 16px 28px; max-width: 720px; margin: 0 auto; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.page-title h2 { margin: 0; font-size: 30px; line-height: 1.1; }

/* Tabbalk */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--wit);
  border-top: 1px solid var(--linnen);
}
.tabbar button {
  border: 0; background: none; padding: 4px 0; min-height: 52px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 500; color: var(--umber-diep);
}
.tabbar svg { width: 24px; height: 24px; padding: 3px 14px; box-sizing: content-box; border-radius: 999px; }
.tabbar button.active { color: var(--inkt); font-weight: 600; }
.tabbar button.active svg { background: var(--sandy); }

/* Knoppen */
.btn {
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--sandy); color: var(--inkt); font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.primary { background: var(--umber-diep); color: var(--creme); }
.btn.accent { background: var(--terracotta); color: var(--creme); }
.btn.outline { background: transparent; border: 2px solid var(--umber-diep); color: var(--umber-diep); }
.btn.danger { background: none; color: var(--terracotta); }
.btn.ghost { background: none; min-height: 44px; padding: 0 10px; color: var(--umber-diep); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn {
  border: 0; background: none; width: 44px; height: 44px; border-radius: 14px; cursor: pointer;
  display: inline-grid; place-items: center; color: var(--umber-diep); flex: none;
}
.icon-btn.filled { background: var(--sandy); color: var(--inkt); }
.icon-btn svg { width: 22px; height: 22px; }

.card { background: var(--wit); border-radius: 20px; }
.muted { color: var(--umber-diep); }
.small { font-size: 14px; }
.label {
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--umber-diep);
}

/* Week */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.weeknav .label-wrap { text-align: center; }
.weeknav strong { display: block; font-family: var(--font-kop); font-weight: 600; font-size: 24px; line-height: 1.15; }
.weeknav .range { font-size: 14px; color: var(--umber-diep); }

.day { padding: 14px 16px; margin-bottom: 12px; }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.day-head .name { font-weight: 600; font-size: 17px; }
.day-head .date { color: var(--umber-diep); font-size: 14px; margin-left: 8px; font-weight: 400; }
.day.today { box-shadow: inset 0 0 0 2px var(--sandy); }
.day.today .name::after {
  content: 'Vandaag'; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  background: var(--sandy); font-size: 12px; font-weight: 600; vertical-align: 2px;
}
.meal { display: flex; align-items: center; gap: 12px; padding: 10px 0 0; margin-top: 10px; border-top: 1px solid var(--linnen); }
.meal .thumb { width: 52px; height: 52px; border-radius: 14px; }
.meal .info { flex: 1; min-width: 0; }
.meal .info .t {
  font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
  background: none; border: 0; padding: 0; text-align: left; width: 100%;
}
.stepper { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--umber-diep); margin-top: 2px; }
.stepper button {
  border: 0; background: var(--linnen); color: var(--inkt); border-radius: 999px;
  width: 30px; height: 30px; line-height: 1; padding: 0; cursor: pointer; font-size: 17px; font-weight: 600;
}

.thumb { object-fit: cover; background: var(--linnen); flex: none; display: grid; place-items: center; color: var(--umber); }
.thumb svg { width: 50%; height: 50%; }

/* Recepten */
.search {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 14px;
  border: 2px solid var(--sandy); background: var(--wit); margin-bottom: 12px; font-size: 16px;
}
.search:focus, .form input:focus, .form textarea:focus, .form select:focus, .login input:focus {
  outline: none; border-color: var(--umber);
}
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0; background: var(--linnen); padding: 8px 16px; min-height: 38px; border-radius: 999px;
  font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; color: var(--inkt);
}
.chip.on { background: var(--umber-diep); color: var(--creme); }

.rlist { display: flex; flex-direction: column; gap: 10px; }
.ritem { display: flex; gap: 14px; align-items: center; padding: 10px; cursor: pointer; text-align: left; width: 100%; border: 0; }
.ritem .thumb { width: 72px; height: 72px; border-radius: 14px; }
.ritem .t { font-weight: 600; font-size: 16px; line-height: 1.3; }
.ritem .meta-line { font-size: 14px; color: var(--umber-diep); margin-top: 2px; }

/* Boodschappen */
.shop-section .label { display: block; margin: 22px 4px 8px; }
.shop-section:first-of-type .label { margin-top: 4px; }
.shop-list { padding: 0 16px; }
.shop-item { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--linnen); cursor: pointer; }
.shop-item:last-child { border-bottom: 0; }
.shop-item input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--umber-diep); flex: none; }
.shop-item .lbl { font-weight: 500; }
.shop-item .from { font-size: 13px; color: var(--umber-diep); }
.shop-item.off .lbl { color: var(--umber); text-decoration: line-through; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* Schermen die over de app schuiven */
#overlay:empty { display: none; }
.sheet {
  position: fixed; inset: 0; z-index: 10; background: var(--creme);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  animation: up .2s ease-out;
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .topbar h1 {
  font-size: 18px; margin: 0; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sheet .topbar .side { min-width: 88px; display: flex; }
.sheet .topbar .side:last-child { justify-content: flex-end; }
.sheet .content { padding: 16px 16px; max-width: 720px; margin: 0 auto; }

.hero { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 24px; background: var(--linnen); display: block; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--linnen); font-size: 14px; font-weight: 600; }
.pill svg { width: 15px; height: 15px; }
.detail h2 { font-size: 30px; line-height: 1.15; margin: 18px 0 0; }
.detail h3 { margin: 28px 0 10px; font-size: 22px; }
.detail ul { padding: 0; margin: 0; list-style: none; }
.detail li { padding: 9px 0; border-bottom: 1px solid var(--linnen); }
.detail li:last-child { border-bottom: 0; }
.detail ul.ingredients { padding: 4px 18px; }
.steps { white-space: pre-line; line-height: 1.6; }
.plan-row { display: flex; gap: 10px; align-items: center; padding: 14px; margin-top: 16px; }
.plan-row select { flex: 1; min-width: 0; }

.form label { display: block; font-size: 14px; font-weight: 600; margin: 16px 2px 6px; }
.form input, .form textarea, .form select, .plan-row select {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px;
  border: 2px solid var(--sandy); background: var(--creme); color: var(--inkt); font-size: 16px;
}
.form textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.form .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.empty { text-align: center; color: var(--umber-diep); padding: 32px 16px 8px; }
.empty .ornament { margin-top: 18px; }
.ornament { display: block; width: 100%; height: 40px; }
.help ol { padding-left: 22px; margin: 8px 0 0; }
.help li { margin: 6px 0; }
.panel { padding: 20px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 8px; font-size: 20px; }
.panel p { margin: 0 0 8px; }

/* Inloggen */
.login { max-width: 360px; margin: 12vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.login h1 { margin: 18px 0 2px; font-size: 40px; line-height: 1; }
.login .sub { font-size: 13px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--umber-diep); }
.login input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--sandy);
  background: var(--wit); margin: 28px 0 10px; font-size: 17px;
}
.login .ornament { margin-top: 36px; }
.error { color: var(--terracotta); min-height: 1.5em; font-weight: 500; }

#toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 20;
  transform: translateX(-50%) translateY(10px); opacity: 0; pointer-events: none;
  background: var(--inkt); color: var(--creme); padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 500;
  transition: .2s; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%); }
