/* S1gnS — palet B "Warm" (beslissing #36). Kleur betekent altijd "welke app". */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  --grond: #FAF6F0;
  --kaart: #FFFFFF;
  --inkt: #231F1A;
  --inkt-2: #3D372F;
  --zacht: #5C554C;
  --lijn: #E8E0D4;
  --lijn-2: #CFC4B4;
  --vlak: #EFE8DD;
  --accent: #B84E2A;
  --accent-donker: #8F3B1F;
  --accent-tint: #F8E5DC;
  --rood: #8E1F18;
  --rood-tint: #FBE7E5;
  --geel-tint: #FFF4E0;
  --geel-rand: #F0D29A;
  --geel-inkt: #5C3A00;
  --radius: 16px;
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --tekst: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --veilig-onder: env(safe-area-inset-bottom, 0px);
  --veilig-boven: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

/* App-kleuren (#36) */
.app-agenda    { --app: #3F6FB5; --app-tint: #E5ECF6; }
.app-nieuws    { --app: #C4562F; --app-tint: #F8E5DC; }
.app-vrijetijd { --app: #5E8C3A; --app-tint: #E9F1E0; }
.app-leren     { --app: #8A5BA8; --app-tint: #F0E8F5; }
.app-beleggen  { --app: #2F7F7A; --app-tint: #DFEFEE; }
.app-geld      { --app: #C9922E; --app-tint: #F8EEDB; }
.app-kansen    { --app: #B8466E; --app-tint: #F6E2EA; }
.app-demo      { --app: #7A746C; --app-tint: #EEEBE6; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--grond);
  color: var(--inkt);
  font-family: var(--tekst);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
a { color: var(--accent); }
a:hover { color: var(--accent-donker); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { padding: 24px; }
[hidden] { display: none !important; }

/* ---------- schermopbouw: inhoud scrolt, tabbalk staat vast (#38) ---------- */
#app { height: 100%; }
.scherm { height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.inhoud {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(20px + var(--veilig-boven)) 20px 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.tabbalk {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--kaart); border-top: 1px solid var(--lijn);
  padding: 6px 12px calc(8px + var(--veilig-onder));
}
.tab {
  min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--zacht); font-size: 12px; font-weight: 500; border-radius: 12px;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- typografie ---------- */
.kop { display: flex; flex-direction: column; gap: 2px; }
.kop .datum { font-size: 14px; font-weight: 500; color: var(--zacht); }
h1 { margin: 0; font-family: var(--display); font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.5px; }
h2.sectie { margin: 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--zacht); }
.sub { margin: 0; font-size: 14px; color: var(--zacht); }
.klein { font-size: 13px; line-height: 1.45; color: var(--zacht); margin: 0; }

/* ---------- kaarten en lijsten ---------- */
.groep { display: flex; flex-direction: column; gap: 8px; }
.kaart { background: var(--kaart); border: 1px solid var(--lijn); border-radius: var(--radius); }
.item {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; text-decoration: none; color: var(--inkt);
  background: var(--kaart); border: 1px solid var(--lijn); border-radius: var(--radius); position: relative;
}
.item:hover { color: var(--inkt); border-color: var(--lijn-2); }
.item .rij1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item .tijd { font-size: 12px; color: var(--zacht); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.item .titel { font-size: 16px; font-weight: 600; line-height: 1.35; }
.item .tekst { font-size: 14px; line-height: 1.45; color: var(--zacht); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item.gelezen .titel { font-weight: 500; color: var(--inkt-2); }
.item .nieuw-stip { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  background: var(--app-tint, var(--vlak)); color: var(--inkt); border-radius: 999px;
  padding: 2px 10px 2px 8px; font-size: 12px; font-weight: 600; max-width: 100%;
}
.chip .stip { width: 8px; height: 8px; border-radius: 50%; background: var(--app, var(--zacht)); flex: 0 0 auto; }
.chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leeg { padding: 22px 16px; text-align: center; color: var(--zacht); font-size: 15px; line-height: 1.5; }
.leeg strong { display: block; color: var(--inkt); font-size: 16px; margin-bottom: 2px; }

.lijst { background: var(--kaart); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 0 16px; display: flex; flex-direction: column; }
.lijst > * + * { border-top: 1px solid var(--vlak); }
.regel { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 10px 0; font-size: 15px; }
.regel .waarde { color: var(--zacht); text-align: right; }
.regel .links { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.regel .links strong { font-weight: 600; }
.regel .links span { font-size: 13px; color: var(--zacht); }
.knop-tekst { min-height: 50px; border: 0; background: transparent; padding: 0; text-align: left; font-size: 15px; font-weight: 600; color: var(--accent); width: 100%; }
.knop-tekst.neutraal { color: var(--inkt); }
.knop-tekst:disabled { color: var(--zacht); cursor: default; }

/* ---------- knoppen ---------- */
.knop {
  min-height: 52px; border-radius: 14px; border: 1px solid var(--lijn-2); background: var(--kaart); color: var(--inkt);
  font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px; text-decoration: none;
}
.knop:hover { color: var(--inkt); border-color: var(--zacht); }
.knop.primair { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.knop.primair:hover { background: var(--accent-donker); border-color: var(--accent-donker); color: #FFFFFF; }
.knop[disabled] { opacity: 0.6; cursor: default; }
.knop svg { width: 20px; height: 20px; flex: 0 0 auto; }
.terug { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--accent); font-size: 16px; font-weight: 500; margin: -6px 0 -6px -4px; }
.terug svg { width: 20px; height: 20px; }

/* segment Vandaag / Deze week */
.segment { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #E9E1D5; border-radius: 12px; padding: 4px; }
.segment button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--zacht); font-size: 14px; font-weight: 500; }
.segment button[aria-pressed="true"] { background: var(--kaart); color: var(--inkt); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* schakelaar */
.schakel { width: 52px; height: 32px; flex: 0 0 auto; border-radius: 16px; border: 0; padding: 3px; display: flex; justify-content: flex-start; background: var(--lijn-2); transition: background 0.15s; }
.schakel::after { content: ""; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.schakel[aria-checked="true"] { justify-content: flex-end; background: var(--accent); }
.schakel:disabled { opacity: 0.5; cursor: default; }

/* meldingen bovenaan */
.alarm { display: flex; align-items: flex-start; gap: 10px; background: var(--rood-tint); color: var(--rood); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 500; line-height: 1.4; }
.alarm::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #B3261E; flex: 0 0 auto; margin-top: 6px; }
.info { background: var(--geel-tint); border: 1px solid var(--geel-rand); border-radius: var(--radius); padding: 14px 16px; color: var(--geel-inkt); display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
.info strong { font-size: 15px; }

/* ---------- inloggen ---------- */
.login { min-height: 100dvh; max-width: 480px; margin: 0 auto; padding: calc(64px + var(--veilig-boven)) 24px calc(28px + var(--veilig-onder)); display: flex; flex-direction: column; gap: 32px; }
.merk { display: flex; align-items: center; gap: 12px; }
.merk svg { width: 40px; height: 40px; }
.merk span { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -0.5px; }
.login form { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.login h1 { font-size: 24px; }
.login .intro { font-size: 16px; line-height: 1.5; }
.veld { display: flex; flex-direction: column; gap: 8px; }
.veld label { font-size: 14px; font-weight: 600; }
.veld input {
  height: 52px; border: 1px solid var(--lijn-2); border-radius: 12px; padding: 0 14px; background: #FFFFFF;
  font-family: var(--display); font-size: 18px; letter-spacing: 1px; width: 100%;
}
.veld input[aria-invalid="true"] { border-color: #B3261E; }
.fout { color: #8E1F18; font-size: 14px; margin: 0; }
.login .voet { margin-top: auto; text-align: center; }

/* ---------- item ---------- */
.item-kop { display: flex; flex-direction: column; gap: 10px; }
.item-kop h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.3px; }
.item-kop .meta { font-size: 14px; color: var(--zacht); }
.item-tekst { margin: 0; font-size: 16px; line-height: 1.55; white-space: pre-line; }
.waarom { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.waarom strong { font-size: 13px; color: var(--inkt-2); }
.waarom span { font-size: 14px; color: var(--zacht); line-height: 1.5; }
.feedback { margin-top: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.feedback h2 { margin: 0; font-size: 16px; font-weight: 600; }
.feedback .knoppen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.feedback .knop[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.feedback .status { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--zacht); min-height: 44px; }
.feedback .status button { min-height: 44px; border: 0; background: transparent; padding: 0; font-weight: 600; color: var(--accent); font-size: 14px; }

/* ---------- week ---------- */
.week-kop { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.week-kop .groot { font-family: var(--display); font-size: 22px; font-weight: 700; }
.balk-rij { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; }
.balk-rij .boven { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.balk-rij .boven span:last-child { color: var(--zacht); }
.balk-rij .onder { display: flex; align-items: center; gap: 10px; }
.balk { flex: 1 1 auto; height: 6px; background: var(--vlak); border-radius: 3px; overflow: hidden; }
.balk > span { display: block; height: 100%; width: 0; background: var(--app, var(--accent)); border-radius: 3px; }
.balk-rij .pct { font-size: 13px; color: var(--zacht); min-width: 92px; text-align: right; }

/* ---------- apps ---------- */
.tegels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tegel {
  border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 136px;
  text-decoration: none; color: var(--inkt); background: var(--app-tint); border: 1px solid var(--app-tint);
}
.tegel:hover { color: var(--inkt); }
.tegel .icoon { width: 40px; height: 40px; border-radius: 12px; background: var(--app); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.tegel .icoon svg { width: 22px; height: 22px; }
.tegel .naam { font-size: 16px; font-weight: 600; }
.tegel .omschr { font-size: 13px; line-height: 1.4; color: var(--zacht); }
.tegel .label { align-self: flex-start; margin-top: auto; background: #FFFFFF; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.tegel.later { background: transparent; border: 1px dashed var(--lijn-2); }
.tegel.later .icoon { background: var(--vlak); color: var(--zacht); }
.tegel.later .naam { color: var(--inkt-2); }
.tegel.later .label { background: transparent; border: 1px solid var(--lijn-2); color: var(--zacht); padding: 2px 10px; }

.app-kop { display: flex; align-items: center; gap: 14px; }
.app-kop .icoon { width: 52px; height: 52px; border-radius: 16px; background: var(--app); color: #FFFFFF; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.app-kop .icoon svg { width: 26px; height: 26px; }
.app-kop h1 { font-size: 28px; }
.overzicht { padding: 16px; display: flex; flex-direction: column; gap: 6px; border-left: 0; }
.overzicht strong { font-size: 16px; }
.pil { flex: 0 0 auto; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: var(--app-tint, var(--vlak)); }

/* ---------- laden, toast ---------- */
.laden { min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--zacht); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--lijn); border-top-color: var(--accent); animation: draai 0.8s linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(86px + var(--veilig-onder)); transform: translateX(-50%);
  background: var(--inkt); color: #FFFFFF; padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2); z-index: 10;
}
.versie { text-align: center; font-size: 12px; color: var(--zacht); margin: 4px 0 0; }

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } .schakel { transition: none; } }
