/* Huisbord fam de Brabander: speels en kleurrijk.
   Wordt NA style.css geladen en overschrijft vooral kleuren, vormen en de kop. */

/* Lettertype Poppins (SIL Open Font License), zelf gehost zodat het ook offline werkt */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/poppins-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/poppins-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/poppins-latin-800-normal.woff2") format("woff2");
}

:root {
  --font-round: "Poppins", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --paper: #FFF7EA;
  --paper-raised: #FFFFFF;
  --ink: #2B2540;
  --ink-soft: #6E6788;
  --line: #F0E4CF;
  --radius: 20px;

  /* Eén kleur per gezinslid (en per tabblad) */
  --zwart: #2E2B26;
  --accent-huibert: #2E2B26;   --accent-huibert-soft: #E7E4DE;   /* vader: zwart */
  --accent-marieke: #FFFFFF;   --accent-marieke-soft: #FFFFFF;   /* moeder: wit (met zwarte rand) */
  --accent-juul: #2D8CFF;      --accent-juul-soft: #DDEBFF;      /* groot: blauw */
  --accent-simon: #17B26A;     --accent-simon-soft: #D5F4E4;     /* middel: groen */
  --accent-eva: #FFC914;       --accent-eva-soft: #FFF3B8;       /* klein: geel */
  --accent-boodschappen: #FF5A36; --accent-boodschappen-soft: #FFE3DB;
  --accent-passen: #00A9C2;    --accent-passen-soft: #D2F3F8;
  --accent-tot: #7B61FF;       --accent-tot-soft: #E7E1FF;
}

html, body {
  font-family: var(--font-round);
}

button, input, select, textarea {
  font-family: inherit;
}

/* Zachte kleurvlekken op de achtergrond */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 18%, rgba(240, 162, 2, 0.14) 0 70px, transparent 71px),
    radial-gradient(circle at 96% 8%, rgba(224, 69, 123, 0.10) 0 90px, transparent 91px),
    radial-gradient(circle at 92% 62%, rgba(47, 128, 200, 0.10) 0 80px, transparent 81px),
    radial-gradient(circle at 4% 86%, rgba(34, 160, 107, 0.12) 0 90px, transparent 91px);
}

.board { padding-top: 14px; }

/* ===== Kop met gezinsfoto ===== */
.board-header { padding: 0 0 14px; }

.family-banner {
  position: relative;
  height: 172px;
  border-radius: 28px;
  overflow: hidden;
  background: #FFE9B0;
  box-shadow: 0 10px 24px rgba(43, 37, 64, 0.16);
}
.family-art, .family-photo, .family-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.family-photo { object-fit: cover; object-position: center 40%; }
.family-photo[hidden] { display: none; }
/* Lichte schaduw over de illustratie, iets sterker over een echte foto (leesbaarheid van de titel) */
.family-shade {
  background: linear-gradient(to top, rgba(30, 20, 60, 0.34) 0%, rgba(30, 20, 60, 0.08) 45%, rgba(30, 20, 60, 0) 65%);
}
.family-banner.has-photo .family-shade {
  background: linear-gradient(to top, rgba(30, 20, 60, 0.62) 0%, rgba(30, 20, 60, 0.18) 48%, rgba(30, 20, 60, 0) 72%);
}
.family-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.family-actions .logout-form { margin: 0; }
.family-chip {
  border: none;
  border-radius: 999px;
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.family-chip:active { transform: scale(0.96); }
.family-titles {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(20, 10, 50, 0.45);
}
.board-header-top { display: block; }
.board-header h1 {
  font-family: var(--font-round);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: #fff;
}
.board-date {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

/* ===== Tabs met foto's ===== */
.tabs {
  gap: 6px;
  border-bottom: none;
  padding: 2px 2px 10px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 62px;
  padding: 8px 6px 7px;
  border: none;
  border-radius: 20px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--accent-soft);
  border-bottom-color: transparent;
}
.tab:active { transform: scale(0.95); opacity: 1; }
.tab-label { line-height: 1; }

.avatar, .tab-ico {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  font-size: 20px;
  transition: box-shadow 0.15s ease;
}
.tab[aria-selected="true"] .avatar,
.tab[aria-selected="true"] .tab-ico {
  box-shadow: 0 0 0 3px var(--accent);
}
.avatar { color: #fff; font-weight: 800; font-size: 18px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar[data-person="huibert"] { background: var(--accent-huibert); }
.avatar[data-person="marieke"] { background: #fff; color: var(--zwart); box-shadow: inset 0 0 0 2px var(--zwart); }
.tab[aria-selected="true"] .avatar[data-person="marieke"] { box-shadow: inset 0 0 0 2px var(--zwart), 0 0 0 3px var(--zwart); }
.chip-avatar[data-person="marieke"] { box-shadow: inset 0 0 0 2px var(--zwart) !important; }
.avatar[data-person="juul"] { background: var(--accent-juul); }
.avatar[data-person="simon"] { background: var(--accent-simon); }
.avatar[data-person="eva"] { background: var(--accent-eva); color: #3A2A00; }
.tab[data-list="boodschappen"] .tab-ico { background: var(--accent-boodschappen-soft); }
.tab[data-list="passen"] .tab-ico { background: var(--accent-passen-soft); }
.tab[data-list="tot"] .tab-ico { background: var(--accent-tot-soft); }
.tab[data-list="agenda"] .tab-ico { background: var(--accent-agenda-soft, #FFEBCB); }

/* ===== Lijsten: ronder en vriendelijker ===== */
.panel {
  border: none;
  border-radius: 24px;
  box-shadow: 0 8px 22px rgba(60, 40, 10, 0.08);
  padding: 8px 6px;
}
.item-row { border-bottom-color: var(--line); }
.item-check { border-radius: 50%; width: 26px; height: 26px; }
.item-number { border-radius: 999px; padding: 3px 8px; min-width: 30px; }
.item-text { font-weight: 600; }
.item-row.done .item-text { font-weight: 500; }
.add-form input[type="text"] { border-radius: 999px; padding-left: 18px; }
.add-form button[type="submit"], .add-form > button { border-radius: 50%; }
.empty-state { color: var(--ink-soft); }

.assignee-chip { font-family: inherit; font-weight: 700; }
.assignee-chip[data-person="huibert"].assigned { background: var(--accent-huibert); border-color: var(--accent-huibert); }
.assignee-chip[data-person="marieke"].assigned { background: #fff; border: 2px solid var(--zwart); color: var(--zwart); }
.assignee-chip[data-person="juul"].assigned { background: var(--accent-juul); border-color: var(--accent-juul); }
.assignee-chip[data-person="simon"].assigned { background: var(--accent-simon); border-color: var(--accent-simon); }
.assignee-chip[data-person="eva"].assigned { background: var(--accent-eva); border-color: var(--accent-eva); color: #3A2A00; }

.sort-store-btn { font-family: inherit; border-radius: 999px; font-weight: 700; }
.passen-card { border-radius: 22px; }
.passen-add, .passen-primary { font-family: inherit; }
.week-day, .agenda-form { border-radius: 18px; }
.week-day-head { font-weight: 700; }

/* ===== Foto's kiezen ===== */
.fam-sheet-bg {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(43, 37, 64, 0.5);
}
.fam-sheet-bg[hidden] { display: none; }
.fam-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-radius: 26px 26px 0 0;
}
.fam-sheet h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.fam-sheet p { margin: 0 0 12px; font-size: 13px; color: var(--ink-soft); }
.fam-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.fam-row .avatar { flex: 0 0 auto; }
.fam-banner-thumb {
  flex: 0 0 auto;
  width: 80px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(#6EC1FF, #FFE9B0);
}
.fam-banner-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fam-row-name { flex: 1; min-width: 0; font-weight: 700; }
.fam-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-passen);
  cursor: pointer;
}
.fam-btn.ghost { color: var(--ink-soft); background: transparent; padding: 8px 8px; font-size: 18px; }
.fam-btn[disabled] { opacity: 0.5; }
.fam-sheet-close {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(43, 37, 64, 0.1);
  cursor: pointer;
}
.fam-error { color: #E03B47; font-size: 13px; margin: 8px 0 0; }

/* ===== Met gezinsfoto: de foto blijft vrij van tekst, de titel komt in een strook eronder ===== */
.family-banner.has-photo {
  height: auto;
  background: #fff;
}
.family-banner.has-photo .family-art,
.family-banner.has-photo .family-shade { display: none; }
.family-banner.has-photo .family-photo {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-position: center;
}
.family-banner.has-photo .family-titles {
  position: static;
  padding: 10px 16px 18px;
  color: var(--ink);
  text-shadow: none;
  background: linear-gradient(90deg, #FFE3DA 0%, #FFF1CF 100%);
}
.family-banner.has-photo .board-header h1,
.family-banner.has-photo h1 { color: var(--ink); }
.family-banner.has-photo .board-date { color: var(--ink-soft); }
.family-banner.has-photo .family-actions {
  top: auto;
  bottom: 14px;
  right: 12px;
}
.family-banner.has-photo .family-chip { background: #fff; box-shadow: 0 1px 4px rgba(43, 37, 64, 0.12); }
.family-banner.has-photo .chip-label { display: none; }

/* ===== Inloggen en beheer ===== */
.chip-avatar { width: 22px; height: 22px; font-size: 12px; box-shadow: none !important; vertical-align: middle; }
.family-chip:has(.chip-avatar) { padding: 4px 6px; }
.bh-who { font-weight: 700; color: var(--ink) !important; }
.bh-ok { color: #11965A; font-size: 13px; font-weight: 600; margin: 8px 0 0; }
.bh-small { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.bh-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.bh-section h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; }
.bh-section h4 { margin: 14px 0 6px; font-size: 14px; font-weight: 700; }
.bh-card { background: #fff; border-radius: 18px; padding: 12px; margin-top: 10px; box-shadow: 0 2px 8px rgba(43, 37, 64, 0.06); }
.bh-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bh-card-head .avatar { width: 34px; height: 34px; font-size: 15px; flex: 0 0 auto; }
.bh-none { margin: 2px 0 6px; }
.bh-pk { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.bh-pk-info { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.bh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bh-input { width: 100%; margin-top: 8px; padding: 11px 16px; border-radius: 999px; border: 2px solid var(--line); font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
.bh-wide { width: 100%; margin-top: 10px; padding: 12px; font-size: 15px; }
a.fam-btn { display: inline-block; text-decoration: none; text-align: center; }
.fam-btn.light { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.fam-btn.small { padding: 6px 10px; font-size: 12px; }
.bh-link { margin-top: 10px; padding: 10px; border-radius: 14px; background: #FFF1CF; }
.bh-url { margin: 6px 0; font-size: 12px; word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); user-select: all; }
.bh-log { display: flex; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.bh-log.bad { background: #FFF0EE; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.bh-log-icon { flex: 0 0 auto; }
.bh-log-text { min-width: 0; }
.bh-log-label { font-size: 14px; font-weight: 600; }
.bh-problems { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: #E03B47; }

/* ===== Weekagenda: formulier past binnen het kader (ook met breder lettertype) ===== */
.agenda-time-row label { min-width: 0; }
.agenda-time-row input { min-width: 0; border-radius: 14px; }
.agenda-time-row button { flex: 0 0 auto; border-radius: 999px; padding: 0 16px; font-family: inherit; }
.agenda-form { border-radius: 22px; }
.agenda-form input, .agenda-form select { border-radius: 14px; }

/* ===== Moeder: wit met zwarte rand =====
   Wit werkt niet als vulkleur op een lichte achtergrond. In haar tabblad gebruiken we daarom
   zwarte lijnen en tekst, en witte vlakken met een zwarte rand. */
body[data-active="marieke"] { --accent: #2E2B26; --accent-soft: #FFFFFF; }
body[data-active="marieke"] .tab[aria-selected="true"] { box-shadow: 0 1px 8px rgba(43, 37, 64, 0.14); }
body[data-active="marieke"] .add-form button { background: #fff; color: var(--zwart); box-shadow: inset 0 0 0 2px var(--zwart); }
body[data-active="marieke"] .item-row.done .item-check { background: #fff; }
body[data-active="marieke"] .item-row.done .item-check svg path { stroke: var(--zwart); }
body[data-active="marieke"] .item-number { background: #fff; box-shadow: inset 0 0 0 1.5px var(--zwart); }
.agenda-entry.person-marieke { border-left-style: double; border-left-width: 6px; border-left-color: var(--zwart); }

/* "Huisbord" groot, "fam de Brabander" eronder */
.board-header h1 .naam-fam { display: block; font-size: 17px; font-weight: 700; letter-spacing: 0; line-height: 1.2; margin-top: 2px; opacity: 0.97; }

/* Passen: knoppen op het scanscherm in dezelfde stijl */
.passen-scan-actions button, .passen-ghost-btn, .passen-secondary { font-family: inherit; font-weight: 700; }

/* ===== Invullen: meer lijst zichtbaar boven het toetsenbord ===== */
.add-form {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  padding: 8px 0;
  margin-top: 0;
  background: var(--paper);
}
.typen-balk { display: none; }
body.typen .typen-balk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 2px;
}
.typen-titel { font-size: 19px; font-weight: 800; color: var(--ink); }
.typen-klaar {
  border: none; border-radius: 999px; padding: 7px 16px; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--ink); background: #fff; box-shadow: inset 0 0 0 2px var(--line); cursor: pointer;
}
body.typen .board-header,
body.typen .tabs,
body.typen #priority-hint,
body.typen #list-tools { display: none !important; }
body.typen .board { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }

/* ===== Geel (Eva) en oranje (Week): donkere tekst waar wit slecht leesbaar is ===== */
body[data-active="eva"] .add-form button { color: #3A2A00; }
body[data-active="eva"] .item-number { color: #7A5A00; }
body[data-active="eva"] .item-check { border-color: #E0AE00; }
body[data-active="eva"] .item-row.done .item-check svg path { stroke: #3A2A00; }
body[data-active="agenda"] .agenda-time-row button { color: #3A2A00; }
