/* Babywangen — warme, zachte huisstijl */
:root {
  --achtergrond: #FFF7F0;
  --kaart: #FFFFFF;
  --tekst: #4A3B36;
  --stil: #9A857C;
  --accent: #E88B6F;      /* perzik */
  --accent-licht: #FBDDCF;
  --groen: #8FBC94;
  --groen-licht: #DDEEDF;
  --rood: #D9534F;
  --schaduw: 0 2px 10px rgba(74, 59, 54, .08);
  --rond: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--achtergrond);
  color: var(--tekst);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  padding-bottom: env(safe-area-inset-bottom);
}

.verborgen { display: none !important; }
.stil { color: var(--stil); font-size: .9em; }
.fout { color: var(--rood); min-height: 1.2em; font-size: .9em; }
.midden { text-align: center; }
.groot { font-size: 1.4em; font-weight: 700; }
h1 { font-size: 1.5em; margin: .3em 0; }
h3 { margin: .2em 0 .6em; font-size: 1.05em; }

/* Invoer */
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  margin: 5px 0;
  border: 1.5px solid #EAD9CE;
  border-radius: 12px;
  background: #FFFDFB;
  color: var(--tekst);
  font-size: 16px; /* voorkomt iOS-zoom */
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
label { font-size: .95em; }

button { font-family: inherit; font-size: 16px; cursor: pointer; }
.knop-primair {
  width: 100%; padding: 13px; margin: 6px 0;
  background: var(--accent); color: #fff; border: none; border-radius: 12px; font-weight: 700;
}
.knop-primair:active { transform: scale(.98); }
.knop-secundair {
  padding: 10px 16px; margin: 6px 0;
  background: var(--accent-licht); color: var(--tekst); border: none; border-radius: 12px; font-weight: 600;
}
.knop-tekst { background: none; border: none; color: var(--stil); text-decoration: underline; padding: 8px; }
.bestand-knop { display: inline-block; text-align: center; width: auto; padding: 10px 16px; }

/* Login */
.scherm-vol {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-kaart {
  background: var(--kaart); border-radius: var(--rond); box-shadow: var(--schaduw);
  padding: 30px 24px; width: 100%; max-width: 360px; text-align: center;
}
.login-logo { font-size: 3em; }

/* Topbalk */
#topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  background: var(--achtergrond); padding: 12px 16px 8px;
}
#topbar button { background: none; border: none; color: var(--accent); font-size: 1.1em; font-weight: 700; padding: 4px 8px 4px 0; }
#topbarTitel { font-weight: 700; font-size: 1.15em; }

/* Home */
#home { padding: 18px 16px 30px; max-width: 520px; margin: 0 auto; }
.kaart {
  background: var(--kaart); border-radius: var(--rond); box-shadow: var(--schaduw);
  padding: 16px; margin: 0 0 14px;
}
.kaart.klein { padding: 12px 14px; }
.kaart.hero { text-align: center; padding: 22px 16px; }
.kaart.alarm { background: #FDECEA; border: 2px solid var(--rood); }
.hero .fruit { font-size: 3.2em; line-height: 1.1; }
.hero .week-groot { font-size: 1.6em; font-weight: 800; margin: 4px 0; }
.voortgang { height: 10px; background: var(--accent-licht); border-radius: 6px; overflow: hidden; margin: 12px 0 4px; }
.voortgang > div { height: 100%; background: var(--accent); border-radius: 6px; }

.tegel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tegel {
  position: relative;
  background: var(--kaart); border: none; border-radius: var(--rond); box-shadow: var(--schaduw);
  padding: 14px 6px 12px; font-size: .82em; font-weight: 600; color: var(--tekst);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.tegel:active { transform: scale(.96); }
.tegel-icoon { font-size: 2em; }
.badge {
  position: absolute; top: 6px; right: 8px;
  background: var(--rood); color: #fff; border-radius: 10px;
  font-size: .75em; padding: 2px 7px; font-weight: 700;
}

/* Subschermen */
.scherm { padding: 6px 16px 40px; max-width: 520px; margin: 0 auto; }
.rij { display: flex; gap: 8px; align-items: center; }
.rij > * { flex: 1; }
.rij > button { flex: 0 0 auto; }

.pillen { display: flex; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap; }
.pil {
  border: none; border-radius: 20px; padding: 8px 16px; font-weight: 600;
  background: var(--kaart); color: var(--stil); box-shadow: var(--schaduw);
}
.pil.actief { background: var(--accent); color: #fff; }

/* Week-scherm */
.week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.week-nav button { background: var(--kaart); border: none; border-radius: 12px; padding: 8px 14px; box-shadow: var(--schaduw); font-weight: 700; color: var(--accent); }
.week-blok { margin: 10px 0; padding: 12px 14px; border-radius: 12px; }
.week-blok.baby { background: var(--groen-licht); }
.week-blok.mama { background: var(--accent-licht); }
.week-blok.papa { background: #EAF2FB; }
.week-blok.hint { background: #FFF3D6; }
.week-blok b { display: block; margin-bottom: 4px; }
.maten { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.maten span { background: var(--achtergrond); border-radius: 10px; padding: 6px 12px; font-size: .9em; }

/* Namen swipen */
.naam-kaart {
  background: var(--kaart); border-radius: 24px; box-shadow: var(--schaduw);
  padding: 46px 20px; text-align: center; margin: 8px 0 14px;
  touch-action: pan-y; user-select: none; position: relative;
}
.naam-kaart .naam { font-size: 2.1em; font-weight: 800; }
.naam-kaart .sub { color: var(--stil); margin-top: 6px; }
.swipe-knoppen { display: flex; gap: 14px; justify-content: center; }
.swipe-knoppen button {
  width: 74px; height: 74px; border-radius: 50%; border: none; font-size: 1.8em;
  box-shadow: var(--schaduw); background: var(--kaart);
}
.swipe-knoppen .nee { color: var(--rood); }
.swipe-knoppen .ja { background: var(--groen); }
.match-item { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px solid #F3E7DE; }
.match-item .naam { flex: 1; font-weight: 600; }
.match-item button { background: none; border: none; font-size: 1.2em; padding: 4px; }
.match-item .geslacht { font-size: .85em; color: var(--stil); }

/* Seintjes */
.seintje-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.seintje-knop {
  border: none; border-radius: var(--rond); box-shadow: var(--schaduw);
  background: var(--kaart); padding: 18px 10px; text-align: center;
}
.seintje-knop:active { transform: scale(.95); background: var(--accent-licht); }
.seintje-knop .emoji { font-size: 2.2em; display: block; }
.seintje-knop .titel { display: block; font-weight: 800; margin-top: 4px; }
.seintje-knop .sub { display: block; font-size: .8em; color: var(--stil); }
.seintje-item { background: var(--kaart); border-radius: 12px; box-shadow: var(--schaduw); padding: 10px 14px; margin-bottom: 8px; }
.seintje-item .kop { display: flex; justify-content: space-between; font-size: .85em; color: var(--stil); }
.reactie-knoppen { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.reactie-knoppen button { background: var(--groen-licht); border: none; border-radius: 16px; padding: 6px 12px; font-size: .9em; }
.reactie-label { margin-top: 6px; font-weight: 600; color: var(--groen); }

/* Lijstjes */
.lijst-item { display: flex; align-items: center; gap: 10px; background: var(--kaart); border-radius: 12px; box-shadow: var(--schaduw); padding: 12px 14px; margin-bottom: 8px; }
.lijst-item .inhoud { flex: 1; }
.lijst-item .titel { font-weight: 600; }
.lijst-item.klaar .titel { text-decoration: line-through; color: var(--stil); }
.lijst-item .meta { font-size: .82em; color: var(--stil); }
.vink {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--accent);
  background: none; font-size: 1em; flex: 0 0 28px; padding: 0;
}
.vink.aan { background: var(--groen); border-color: var(--groen); color: #fff; }
.weg-knop { background: none; border: none; color: var(--stil); font-size: 1.1em; padding: 4px; }

/* Schopjes & weeën */
.schop-knop {
  width: 170px; height: 170px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 1.5em; font-weight: 800;
  box-shadow: 0 6px 20px rgba(232, 139, 111, .45); margin: 10px auto; display: block;
}
.schop-knop:active { transform: scale(.93); }
.schop-knop.wee { background: var(--groen); box-shadow: 0 6px 20px rgba(143, 188, 148, .5); }
.schop-knop.wee.bezig { background: var(--rood); }
.staaf-grafiek { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.staaf { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; font-size: .65em; color: var(--stil); height: 100%; }
.staaf > div { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }

/* Foto's */
.foto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.foto-grid figure { margin: 0; position: relative; }
.foto-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; }
.foto-grid figcaption { text-align: center; font-size: .8em; color: var(--stil); padding: 3px 0; }
.foto-grid .weg-knop { position: absolute; top: 2px; right: 2px; background: rgba(255,255,255,.85); border-radius: 50%; width: 26px; height: 26px; font-size: .9em; }
.dagboek-item img { max-width: 100%; border-radius: 12px; margin-top: 8px; }

/* Voorspellingen / groei */
table.netjes { width: 100%; border-collapse: collapse; }
table.netjes td, table.netjes th { padding: 8px 6px; text-align: left; border-bottom: 1px solid #F3E7DE; font-size: .95em; }
.groei-grafiek { width: 100%; height: auto; }

@media (min-width: 600px) {
  .tegel-grid { grid-template-columns: repeat(4, 1fr); }
}
