/* Kasboek (design-handoff scherm 23): gedeelde uitgaven + saldo + verrekenen,
   plus de "Kosten verrekenen"-gate. Hergebruikt de warme design-tokens. */

.kasboek,
.kasboek-detail,
.kasboek-form,
.kasboek-gate { padding-bottom: 28px; }

/* ── Gedeeld/Solo-toggle ─────────────────────────────────────────────── */
.kasboek__tabs {
  display: flex;
  gap: 3px;
  background: var(--color-soft);
  border-radius: 13px;
  padding: 3px;
  margin: 4px 0 16px;
}
.kasboek__tab {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: 10px;
  font-size: var(--text-13);
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color .18s ease;
}
.kasboek__tab--active {
  background: var(--color-surface);
  color: var(--color-accent);
  box-shadow: var(--shadow-4);
}

/* ── Saldokaart ──────────────────────────────────────────────────────── */
.kasboek__balance {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 22px;
  box-shadow: var(--shadow-8);
  padding: 18px;
  margin-bottom: 16px;
}
.kasboek__balance-head { display: flex; align-items: center; justify-content: space-between; }
.kasboek__balance-label {
  font-size: var(--text-xs); font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; color: var(--color-faint);
}
.kasboek__balance-count {
  font-size: var(--text-11); font-weight: 700; color: var(--color-text-muted);
  background: var(--color-softer); padding: 3px 9px; border-radius: 8px;
}
.kasboek__balance-flow { display: flex; align-items: center; gap: 11px; margin: 15px 0 12px; }
.kasboek__avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: var(--text-lg);
}
.kasboek__avatar--debtor { background: var(--color-coparent-soft); color: var(--color-coparent); }
.kasboek__avatar--creditor { background: var(--color-soft); color: var(--color-accent); }
/* Eigen afmeting is hier VERPLICHT: de view geeft `klass: "kasboek__arrow"` mee en dat
   vervangt de standaard `icon`-class, waar de 20x20 normaal vandaan komt. Zonder deze
   regel schaalt de SVG op tot de hele kaart. */
.kasboek__arrow { flex: none; width: 20px; height: 20px; color: var(--color-faint); }
.kasboek__balance-amount {
  flex: 1; text-align: right; font-family: var(--font-display);
  font-size: var(--text-32); font-weight: 600; line-height: 1;
}
.kasboek__amount-strong--you { color: var(--color-accent); }
.kasboek__amount-strong--co { color: var(--color-coparent); }
.kasboek__balance-text { font-size: var(--text-13); color: var(--color-text-muted); line-height: 1.4; margin: 0 0 15px; }
.kasboek__settle-all { width: 100%; }

/* Gelijk-strook */
.kasboek__equal {
  display: flex; align-items: center; gap: 14px;
  background: var(--color-green-soft); border-radius: 22px; padding: 20px; margin-bottom: 16px;
}
.kasboek__equal-icon {
  flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--color-surface);
  display: flex; align-items: center; justify-content: center; color: var(--color-green);
}
.kasboek__equal-icon svg { width: 24px; height: 24px; }
.kasboek__equal-text { display: flex; flex-direction: column; }
.kasboek__equal-title { font-size: var(--text-base); font-weight: 800; color: var(--color-green); }
.kasboek__equal-sub { font-size: var(--text-13); color: var(--color-text-muted); margin-top: 2px; }

/* Solo-kaart */
.kasboek__solocard {
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: 22px; box-shadow: var(--shadow-8); padding: 18px; margin-bottom: 16px;
  display: flex; flex-direction: column;
}
.kasboek__solocard-label {
  font-size: var(--text-xs); font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; color: var(--color-faint);
}
.kasboek__solocard-amount { font-family: var(--font-display); font-size: var(--text-32); font-weight: 600; margin-top: 6px; line-height: 1; }
.kasboek__solocard-sub { font-size: var(--text-13); color: var(--color-text-muted); margin: 6px 0 0; line-height: 1.4; }

/* ── Lijst per maand ─────────────────────────────────────────────────── */
.kasboek__grouphead { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 9px; }
.kasboek__grouplabel {
  font-size: var(--text-xs); font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--color-faint);
}
.kasboek__grouptotal { font-size: var(--text-xs); font-weight: 700; color: var(--color-text-muted); }
.kasboek__list {
  list-style: none; margin: 0 0 16px; padding: 0;
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: 18px; box-shadow: var(--shadow-4); overflow: hidden;
}
.kasboek__row {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px;
  border-bottom: 1px solid var(--color-line); text-decoration: none; color: inherit;
}
.kasboek__item:last-child .kasboek__row { border-bottom: none; }
.kasboek__row:active { background: var(--color-softer); }
.kasboek__cat {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.kasboek__cat svg { width: 19px; height: 19px; }
.kasboek__cat--school { background: var(--color-soft); color: var(--color-accent); }
.kasboek__cat--sport { background: var(--color-green-soft); color: var(--color-green); }
.kasboek__cat--kleding { background: var(--color-coparent-soft); color: var(--color-coparent); }
.kasboek__cat--medisch { background: var(--color-amber-soft); color: var(--color-amber); }
.kasboek__cat--overig { background: var(--color-softer); color: var(--color-faint); }
.kasboek__body { flex: 1; min-width: 0; }
.kasboek__titel { font-size: var(--text-15); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.kasboek__clip { flex: none; width: 13px; height: 13px; color: var(--color-faint); }
.kasboek__sub { display: block; font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kasboek__amount { flex: none; text-align: right; }
.kasboek__bedrag { font-size: var(--text-15); font-weight: 800; }
.kasboek__settled { display: block; font-size: var(--text-10); font-weight: 800; color: var(--color-green); margin-top: 2px; }

/* ── Detail ──────────────────────────────────────────────────────────── */
.kasboek-detail__hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.kasboek-detail__cat { width: 52px; height: 52px; border-radius: 15px; }
.kasboek-detail__cat svg { width: 25px; height: 25px; }
.kasboek-detail__hero-text { flex: 1; min-width: 0; }
.kasboek-detail__title { font-family: var(--font-display); font-size: var(--text-22); font-weight: 500; line-height: 1.15; margin: 0; }
.kasboek-detail__amount { font-family: var(--font-display); font-size: var(--text-24); font-weight: 600; margin-top: 2px; display: block; }
.kasboek-detail__status {
  flex: none; align-self: flex-start; font-size: var(--text-11); font-weight: 800;
  padding: 5px 11px; border-radius: 9px;
}
.kasboek-detail__status--open { color: var(--color-amber); background: var(--color-amber-soft); }
.kasboek-detail__status--done { color: var(--color-green); background: var(--color-green-soft); }
.kasboek-detail__shares { display: flex; gap: 10px; margin-bottom: 16px; }
.kasboek-detail__share { flex: 1; border-radius: 16px; padding: 13px 15px; }
.kasboek-detail__share--you { background: var(--color-soft); }
.kasboek-detail__share--co { background: var(--color-coparent-soft); }
.kasboek-detail__share-label { font-size: var(--text-xs); font-weight: 700; }
.kasboek-detail__share--you .kasboek-detail__share-label,
.kasboek-detail__share--you .kasboek-detail__share-amount { color: var(--color-accent); }
.kasboek-detail__share--co .kasboek-detail__share-label,
.kasboek-detail__share--co .kasboek-detail__share-amount { color: var(--color-coparent); }
.kasboek-detail__share-amount { display: block; font-family: var(--font-display); font-size: var(--text-20); font-weight: 600; margin-top: 3px; }
.kasboek-detail__fields {
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: 18px; box-shadow: var(--shadow-4); overflow: hidden;
}
.kasboek-detail__field { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--color-line); }
.kasboek-detail__field--last { border-bottom: none; }
.kasboek-detail__field-label { font-size: var(--text-sm); color: var(--color-text-muted); }
.kasboek-detail__field-value { font-size: var(--text-sm); font-weight: 700; }
.kasboek-detail__field-value--muted { color: var(--color-text-muted); font-weight: 500; }
.kasboek-detail__note {
  display: flex; gap: 10px; background: var(--color-softer);
  border-radius: 14px; padding: 13px 15px; margin-top: 14px;
}
.kasboek-detail__note svg { flex: none; width: 17px; height: 17px; color: var(--color-faint); margin-top: 1px; }
.kasboek-detail__note span { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.45; }
.kasboek-detail__settle { width: 100%; margin-top: 18px; }
.kasboek-detail__actions { display: flex; gap: 10px; margin-top: 10px; }
.kasboek-detail__edit, .kasboek-detail__delete { flex: 1; }

/* ── Formulier ───────────────────────────────────────────────────────── */
.kasboek-form__body { display: flex; flex-direction: column; }
.kasboek-form__label { font-size: var(--text-13); font-weight: 700; margin: 6px 0 8px; }
.kasboek-form__title {
  width: 100%; border: none; border-bottom: 1.5px solid var(--color-line);
  background: none; padding: 8px 2px; font-size: var(--text-20); font-family: inherit;
  color: var(--color-text); outline: none; margin-bottom: 18px;
}
.kasboek-form__amount {
  display: flex; align-items: center; border: 1px solid var(--color-line);
  background: var(--color-surface); border-radius: 12px; padding: 0 14px; margin-bottom: 18px;
}
.kasboek-form__euro { font-size: var(--text-base); color: var(--color-text-muted); font-weight: 700; }
.kasboek-form__amount-input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-family: inherit; font-size: var(--text-base); padding: 12px 8px; color: var(--color-text);
}
.kasboek-form__chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.kasboek-form__chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px;
  border-radius: 11px; cursor: pointer; border: 1px solid var(--color-line);
  background: var(--color-surface); font-size: var(--text-13); font-weight: 700; color: var(--color-text-muted);
  transition: transform .12s ease;
}
.kasboek-form__chip:active { transform: scale(.95); }
.kasboek-form__chip svg { width: 16px; height: 16px; }
.kasboek-form__chip-input { position: absolute; top: 0; left: 0; opacity: 0; width: 0; height: 0; }
.kasboek-form__chip:has(.kasboek-form__chip-input:checked) {
  background: var(--color-soft); border-color: var(--color-accent); color: var(--color-accent);
}
.kasboek-form__chip--payer { padding: 7px 13px 7px 7px; border-radius: 24px; }
.kasboek-form__chip-avatar {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--color-soft); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: 800;
}
.kasboek-form__cols { display: flex; gap: 10px; margin-bottom: 18px; }
.kasboek-form__col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kasboek-form__input {
  width: 100%; border: 1px solid var(--color-line); background: var(--color-surface);
  border-radius: 12px; padding: 12px 14px; font-size: var(--text-sm); font-family: inherit;
  color: var(--color-text); outline: none;
}
.kasboek-form__input--select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
}
.kasboek-form__input--textarea { resize: vertical; min-height: 60px; margin-bottom: 18px; }
.kasboek-form__toggle {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: 14px; padding: 13px 15px; margin-bottom: 14px; cursor: pointer;
}
.kasboek-form__toggle-text { flex: 1; }
.kasboek-form__toggle-title { font-size: var(--text-15); font-weight: 700; display: block; }
.kasboek-form__toggle-sub { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 1px; display: block; }
.kasboek-form__toggle-input { position: absolute; top: 0; left: 0; opacity: 0; }
.kasboek-form__toggle-track {
  flex: none; width: 46px; height: 27px; border-radius: 14px;
  background: var(--color-faint); padding: 3px; transition: background .2s ease; position: relative;
}
.kasboek-form__toggle-track::after {
  content: ""; display: block; width: 21px; height: 21px; border-radius: 50%;
  background: var(--color-surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s ease;
}
.kasboek-form__toggle-input:checked + .kasboek-form__toggle-track { background: var(--color-accent); }
.kasboek-form__toggle-input:checked + .kasboek-form__toggle-track::after { transform: translateX(19px); }
.kasboek-form__hint { font-size: var(--text-xs); color: var(--color-text-muted); margin: -10px 0 18px; line-height: 1.4; }
.kasboek-form__check { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: var(--text-sm); font-weight: 600; }
.kasboek-form__save { width: 100%; margin-top: 6px; }

/* ── Gate "Kosten verrekenen" ────────────────────────────────────────── */
.kasboek-gate__intro { font-size: var(--text-sm); color: var(--color-text-muted); margin: 7px 0 18px; line-height: 1.5; }
.kasboek-gate__points {
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: 18px; box-shadow: var(--shadow-4); overflow: hidden; margin-bottom: 18px;
}
.kasboek-gate__point { display: flex; gap: 13px; padding: 14px 16px; border-bottom: 1px solid var(--color-line); }
.kasboek-gate__point:last-child { border-bottom: none; }
.kasboek-gate__point svg { flex: none; width: 19px; height: 19px; color: var(--color-accent); margin-top: 1px; }
.kasboek-gate__point span { font-size: var(--text-sm); color: var(--color-text); line-height: 1.45; }
.kasboek-gate__cta { width: 100%; margin-bottom: 10px; }

/* Voorstel-strip — spiegelt de samen-flow (status + inline actie als één blok),
   maar standalone: eigen rand + radius i.p.v. aan een kaart vastgeplakt. */
.kasboek-gate__strip { border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.kasboek-gate__strip--sent { background: var(--color-amber-soft); border: 1px solid var(--color-amber-border); }
.kasboek-gate__strip--received { background: var(--color-coparent-soft); border: 1px solid var(--color-coparent-border); }
.kasboek-gate__strip--on {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--color-green-soft); border: 1px solid var(--color-green-border);
}
.kasboek-gate__strip-status { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); font-weight: 700; }
.kasboek-gate__strip--on .kasboek-gate__strip-status { color: var(--color-green-deep); }
.kasboek-gate__strip--on .kasboek-gate__strip-status svg { flex: none; width: 16px; height: 16px; color: var(--color-green); }
.kasboek-gate__strip-text { font-size: var(--text-sm); line-height: 1.5; margin: 0; }
.kasboek-gate__strip--sent .kasboek-gate__strip-text { color: var(--color-amber-deep); }
.kasboek-gate__strip--received .kasboek-gate__strip-text { color: var(--color-coparent-deep); }
.kasboek-gate__strip-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.kasboek-gate__linkbtn {
  background: none; border: none; cursor: pointer; padding: 0;
  font: inherit; font-size: var(--text-13); font-weight: 800; white-space: nowrap;
}
.kasboek-gate__linkbtn--amber { color: var(--color-amber-deep); }
.kasboek-gate__linkbtn--danger { color: var(--color-error); }
.kasboek-gate__strip-actions { display: flex; gap: 9px; margin-top: 11px; }
.kasboek-gate__strip-grow { flex: 1; display: flex; }
.kasboek-gate__accept {
  flex: 1; width: 100%; text-align: center;
  background: var(--color-coparent); color: var(--color-on-accent); border: none; cursor: pointer;
  font: inherit; font-weight: 700; font-size: var(--text-sm);
  padding: 11px; border-radius: 11px; transition: transform var(--dur-fast) var(--curve-decel);
}
.kasboek-gate__accept:active { transform: scale(0.98); }
.kasboek-gate__notnow {
  flex: none; padding: 11px 16px; text-align: center;
  background: var(--color-surface); color: var(--color-text-muted);
  border: 1px solid var(--color-line); cursor: pointer;
  font: inherit; font-weight: 700; font-size: var(--text-sm); border-radius: 11px;
  transition: transform var(--dur-fast) var(--curve-decel);
}
.kasboek-gate__notnow:active { transform: scale(0.98); }

/* ── Gezin-hub entry-kaart ───────────────────────────────────────────── */
.gezinhub__kosten {
  display: flex; align-items: center; gap: 13px;
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-4);
  text-decoration: none; color: inherit; margin-top: 10px;
}
.gezinhub__kosten-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--color-softer);
  display: flex; align-items: center; justify-content: center; color: var(--color-accent);
}
.gezinhub__kosten-icon svg { width: 20px; height: 20px; }
.gezinhub__kosten-text { flex: 1; min-width: 0; }
.gezinhub__kosten-title { display: block; font-size: var(--text-15); font-weight: 700; }
.gezinhub__kosten-sub { display: block; font-size: var(--text-13); color: var(--color-text-muted); margin-top: 1px; }
.gezinhub__kosten-chevron { flex: none; width: 19px; height: 19px; color: var(--color-faint); }

/* ── Verdeling-slider ────────────────────────────────────────────────── */
.kasboek__split {
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: 14px; padding: 14px 15px; margin-bottom: 6px;
}
.kasboek-form__split { margin-bottom: 6px; }
.kasboek-form__split-row { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-13); font-weight: 800; margin-bottom: 8px; }
.kasboek-form__split-payer { color: var(--color-accent); }
.kasboek-form__split-other { color: var(--color-coparent); }
.kasboek-form__split-input { width: 100%; accent-color: var(--color-accent); }

/* ── Bonnetje (formulier + detail) ───────────────────────────────────── */
.kasboek-form__receipt-have {
  display: flex; align-items: center; gap: 10px; background: var(--color-green-soft);
  border-radius: 12px; padding: 11px 14px; margin-bottom: 10px;
  font-size: var(--text-13); font-weight: 700; color: var(--color-green);
}
.kasboek-form__receipt-have svg { flex: none; width: 18px; height: 18px; }
.kasboek-form__receipt-input { width: 100%; font-size: var(--text-13); margin-bottom: 4px; }
.kasboek-detail__section-label {
  display: block; font-size: var(--text-xs); font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--color-faint); margin: 20px 4px 10px;
}
.kasboek-detail__receipt { display: block; }
.kasboek-detail__receipt img { width: 100%; border-radius: 16px; border: 1px solid var(--color-line); display: block; }
.kasboek-detail__receipt-link { width: 100%; }
