/* Geld — zelfde familie als Kleren: vette koppen in twee tinten, platte vormen, gekleurde kaarten op lichtgrijs.
   Geldkleuren per groep: vast = blauwgrijs, vrij besteden = warm zand, sparen/inkomen = groen, intern = grijs.
   Nooit rood voor geld: krap = rustig amber. Bedragen altijd met tabelcijfers (.amt). */

@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/inter-opsz-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #ededea;
  --cell: #ffffff;
  --fill: rgba(17, 17, 17, 0.07);
  --fill-2: rgba(17, 17, 17, 0.13);
  --text: #111111;
  --text-2: #5e5e5a;   /* ≥ 4,5:1 op --bg en wit */
  --text-3: #858580;   /* alleen grote tekst en iconen (≥ 3:1) */
  --sep: rgba(17, 17, 17, 0.1);
  --blue: #2f54eb;
  --indigo: #6e44e0;
  --green: #1e7a3c;
  --teal: #0d7a8a;
  --red: #c8102e;
  --orange: #f05a28;
  /* kleurenschema van het scherm; js/theme.js overschrijft dit voor een stuk */
  --page: var(--bg);
  --page-ink: var(--text);
  --page-ink-2: var(--text-2);
  --page-line: var(--sep);
  --photo-card: #f6f6f3;
  --accent: #111111;
  --on-accent: #ffffff;
  --accent-ink: #111111;
  --accent-soft: rgba(17, 17, 17, 0.06);
  --focus: #111111;
  --r-card: 22px;
  --r-cell: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(58px + var(--safe-bottom));
  --nav-h: calc(50px + var(--safe-top));
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--page-ink);
  font: 500 17px/1.35 var(--font);
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  touch-action: manipulation;
  transition: background-color 0.35s ease;
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
/* witte vlakken houden donkere tekst, ook op een gekleurd scherm */
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.icon { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.icon svg { width: 100%; height: 100%; }
.icon.big { width: 56px; height: 56px; color: var(--text-3); }
.icon.chev { width: 16px; height: 16px; color: var(--text-3); }
.muted { color: var(--text-2); }
.hint { color: var(--text-2); font-size: 13px; margin: 6px 0 0; }
.center { text-align: center; justify-content: center; }
.pad { padding: 32px 16px; }
.pad-x { padding: 0 16px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.boot { height: 100dvh; }
.shape { display: block; }
.shape svg { display: block; width: 100%; height: 100%; }

/* ---------- navigatiebalk + grote titel in twee tinten ---------- */
.view { min-height: 100dvh; padding-bottom: calc(var(--tabbar-h) + 24px); }
body.no-tabs .view { padding-bottom: 24px; }
body.no-tabs .tabbar { display: none; }
.nav {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h); padding: var(--safe-top) 8px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  color: var(--page-ink);
  transition: background 0.2s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--page) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}
.nav-title { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.nav.scrolled .nav-title, .nav-title.visible { opacity: 1; }
.nav-side { display: flex; align-items: center; gap: 4px; }
.nav-side.right { justify-content: flex-end; }
.nav-btn {
  min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--page-ink); border-radius: 22px; font-weight: 600;
}
.nav-btn .icon { width: 24px; height: 24px; }
.nav-btn.text { padding: 0 10px; font-size: 17px; }
.nav-btn.back { padding-left: 0; gap: 0; }
.nav-btn:active { opacity: 0.5; }
.large-title {
  margin: 0 0 16px; font-size: 42px; line-height: 0.95; font-weight: 800; letter-spacing: -0.05em;
  color: var(--page-ink);
}
.large-title .t1, .large-title .t2 { display: block; }
.large-title .t2 { color: var(--text-3); }
html.themed .large-title .t2 { color: var(--page-ink-2); }
.page { padding: 6px 16px 0; max-width: 760px; margin: 0 auto; }
.subtitle { color: var(--text-2); margin: -6px 0 16px; }

/* ---------- tabbalk ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: var(--tabbar-h); padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--page) 90%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 -1px 0 var(--page-line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--page-ink-2); font-size: 10.5px; font-weight: 700; letter-spacing: 0;
}
.tab .icon { width: 24px; height: 24px; }
.tab.on { color: var(--page-ink); }
.tab.on::after { content: ''; width: 4px; height: 4px; border-radius: 2px; background: currentColor; margin-top: -1px; }
.tab.on span:not(.icon) { display: none; }
.tab:active { opacity: 0.6; }

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.02em; transition: transform 0.12s, opacity 0.12s;
}
.btn:active { transform: scale(0.97); opacity: 0.88; }
.btn:disabled { opacity: 0.4; }
.btn .icon { width: 20px; height: 20px; }
.btn.wide { width: 100%; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.indigo { background: var(--indigo); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.teal { background: var(--teal); color: #fff; }
/* hoofdknop direct op het (gekleurde) scherm: altijd ≥ 3:1 tegen de achtergrond */
.btn.accent { background: var(--page-btn, var(--accent)); color: var(--on-page-btn, var(--on-accent)); }
.btn.grey { background: var(--fill); color: var(--text); }
html.themed .btn.grey { background: rgba(255, 255, 255, 0.92); color: var(--text); }
.btn.dark { background: var(--text); color: #fff; }
.btn.icon-only { width: 52px; padding: 0; flex: none; }
.danger-text { color: var(--red) !important; }
.link { color: var(--accent-ink); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; }
.link.small { font-size: 13px; padding: 4px 0; }
.link .icon { width: 18px; height: 18px; }
.icon-btn { width: 36px; height: 36px; border-radius: 18px; color: var(--text-2); font-size: 22px; flex: none; }

.fab {
  position: fixed; z-index: 25; right: 16px; bottom: calc(var(--tabbar-h) + 14px);
  display: inline-flex; align-items: center; gap: 6px; height: 52px; padding: 0 22px 0 18px;
  border-radius: 26px; font-weight: 700; color: #fff; letter-spacing: -0.02em;
  box-shadow: 0 8px 24px rgba(47, 84, 235, 0.3); transition: transform 0.12s;
}
.fab.blue { background: var(--blue); }
.fab .icon { width: 22px; height: 22px; }
.fab:active { transform: scale(0.95); }
body.sheet-open .fab { visibility: hidden; }

/* ---------- segmenten ---------- */
.segmented { display: flex; padding: 3px; border-radius: 999px; background: var(--fill); margin: 0 0 12px; }
.seg { flex: 1; height: 34px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--text); transition: background 0.2s, color 0.2s; }
.seg.on { background: var(--accent); color: var(--on-accent); }
.mini-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill); }
.mini-seg button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.mini-seg button.on { background: var(--accent); color: var(--on-accent); }
.mini-seg.center { display: flex; width: max-content; margin: 12px auto 0; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 36px; padding: 0 15px; border-radius: 999px; background: var(--fill);
  font-size: 15px; font-weight: 600; white-space: nowrap; transition: background 0.15s, color 0.15s, transform 0.1s;
}
.chip:active { transform: scale(0.96); }
.chip .icon { width: 18px; height: 18px; }
.chip.on { background: var(--accent); color: var(--on-accent); }
.chip.soft { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fill-2); }
.chip.soft.on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.chips-label { align-self: center; font-size: 13px; color: var(--text-2); min-width: 64px; font-weight: 600; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22); flex: none; }
.chip.on .dot { box-shadow: 0 0 0 2px var(--on-accent); }
.active-filters { margin: -6px 0 14px; }
.active-filters:empty { display: none; }

/* ---------- zoeken ---------- */
.searchbar {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  background: var(--fill); border-radius: 999px; margin: 0 0 12px; color: var(--text-2);
}
.searchbar .icon { width: 19px; height: 19px; }
.search-input { flex: 1; border: 0; background: none; outline: none; height: 100%; font-size: 17px; font-weight: 500; color: var(--text); }
.search-input::placeholder { color: var(--text-2); }

/* ---------- banners ---------- */
.banners { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.banners:empty { display: none; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-cell); background: var(--cell); }
.banner.inbox { background: #111; color: #fff; }
.banner.inbox .banner-text small { color: #b8b8b4; }
.banner.inbox .chev { color: #b8b8b4; }
.banner-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.banner-text b { font-size: 16px; font-weight: 800; letter-spacing: -0.03em; }
.banner-text small { font-size: 13px; color: var(--text-2); font-weight: 500; }
.progress { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 3px; transition: width 0.3s; }

/* ---------- lege staat ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 20px; }
.empty .shape { width: 180px; margin-bottom: 8px; color: var(--page-ink); }
.empty h2 { margin: 6px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; color: var(--page-ink); }
.empty p { margin: 0 0 8px; color: var(--page-ink-2); max-width: 340px; }
.spinner { width: 28px; height: 28px; margin: 48px auto; border-radius: 50%; border: 3px solid var(--fill); border-top-color: var(--text-2); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- gegroepeerde lijsten ---------- */
.group { margin: 22px 0 0; }
.group-title { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; color: var(--page-ink); margin: 0 0 8px 4px; }
.cells { background: var(--cell); border-radius: var(--r-cell); overflow: hidden; }
.cell {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 50px; padding: 11px 16px; width: 100%; text-align: left; min-width: 0;
}
.cell + .cell::before { content: ''; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--sep); }
.cell.cell-value { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.nav-cell { font-weight: 600; }
.nav-cell:active { background: var(--fill); }
.field { min-width: 0; }
.field-label { font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; letter-spacing: -0.02em; }
.cell.field-unit { font-size: 12px; color: var(--text-2); font-weight: 500; }

/* ---------- invoer ---------- */
.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 14px;
  background: var(--fill); outline: none; font-size: 17px; font-weight: 500;
}
.input:focus { box-shadow: 0 0 0 2.5px var(--focus); }
.input.bad { box-shadow: 0 0 0 2.5px var(--red); }
.input.short { width: 110px; }
textarea.input { resize: vertical; line-height: 1.4; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e5e5a' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.picker { text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker.placeholder { color: var(--text-2); }
.with-unit { display: flex; align-items: center; gap: 6px; }
.with-unit .input { flex: 1; }
.unit-pre, .unit-post { color: var(--text-2); font-size: 15px; font-weight: 600; flex: none; }
.money { text-align: right; max-width: 140px; }
.cell.inline .with-unit { justify-content: flex-end; }
input[type="date"].input, input[type="month"].input {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; width: 100%; text-align: left;
}
input[type="date"]::-webkit-date-and-time-value, input[type="month"]::-webkit-date-and-time-value { text-align: left; }
.hint.bad { color: var(--red); }



.disclosure {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin: 22px 0 0; padding: 15px 16px; border-radius: var(--r-cell); background: var(--cell);
  color: var(--accent-ink); font-size: 16px; font-weight: 700;
}
.rot90 { transform: rotate(90deg); }
.rot-90 { transform: rotate(-90deg); }

/* ---------- vandaag: gekleurde kaarten ---------- */
.card { border-radius: var(--r-card); padding: 16px; background: var(--card-bg, var(--cell)); color: var(--card-ink, var(--text)); }
.card-title { display: flex; flex-direction: column; font-size: 22px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.card-title span { color: var(--card-ink-2, var(--text-2)); }
.card-meta { font-size: 12px; font-weight: 700; color: var(--card-ink-2, var(--text-2)); letter-spacing: -0.01em; }
/* ---------- bladen ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0);
  display: flex; align-items: flex-end; justify-content: center; transition: background 0.3s;
  height: var(--vv-h, 100dvh); top: var(--vv-top, 0);
}
.sheet-backdrop.open { background: rgba(0, 0, 0, 0.35); }
.sheet {
  width: 100%; max-width: 640px; max-height: calc(var(--vv-h, 100dvh) - var(--safe-top) - 24px);
  display: flex; flex-direction: column; color: var(--text);
  background: #f1f1ee; border-radius: 28px 28px 0 0;
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: var(--safe-bottom);
}
.sheet-backdrop.open .sheet { transform: translateY(0); }
.sheet.tall { height: calc(var(--vv-h, 100dvh) - var(--safe-top) - 24px); }
.sheet-grab { flex: none; height: 24px; display: flex; justify-content: center; align-items: center; touch-action: none; }
.sheet-grab::before { content: ''; width: 38px; height: 5px; border-radius: 3px; background: var(--fill-2); }
.sheet-head { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 18px 10px; touch-action: none; }
.sheet-title { grid-column: 2; font-weight: 800; letter-spacing: -0.03em; }
.sheet-done { grid-column: 3; justify-self: end; color: var(--accent-ink); font-weight: 700; height: 36px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 20px; flex: 1; }
.sheet-actions { margin-top: 14px; }

.action-sheet { background: transparent; padding: 0 10px calc(10px + var(--safe-bottom)); }
.action-sheet .sheet-grab { display: none; }
.action-sheet .sheet-body { padding: 0; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.actions-group { background: #fff; border-radius: 24px; overflow: hidden; }
.actions-title { margin: 0; padding: 14px 16px 10px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-2); background: #fff; border-radius: 24px 24px 0 0; }
.actions-title + .actions-group { border-radius: 0 0 24px 24px; }
.action { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.action + .action::before { content: ''; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--sep); }
.action .icon { width: 20px; height: 20px; }
.action.danger { color: var(--red); }
.action.checked { font-weight: 800; }
.action-check { position: absolute; right: 18px; }
.action.cancel { background: #111; color: #fff; border-radius: 999px; font-weight: 700; }
.action:active { background: var(--fill); }
.action.cancel:active { background: #333; }


.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.pick-list { display: flex; flex-direction: column; background: #fff; border-radius: var(--r-cell); overflow: hidden; }
.pick { min-height: 48px; border-radius: 999px; background: #fff; font-size: 17px; font-weight: 700; }
.pick-list .pick { border-radius: 0; text-align: left; padding: 0 16px; font-weight: 600; position: relative; }
.pick-list .pick + .pick::before { content: ''; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--sep); }
.pick.on { background: var(--accent); color: var(--on-accent); }
.pick:active { transform: scale(0.97); }
.pick.clear { grid-column: 1 / -1; color: var(--red); background: #fff; }

.add-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 16px; text-align: left; position: relative; }
.add-row + .add-row::before { content: ''; position: absolute; top: 0; left: 70px; right: 16px; height: 1px; background: var(--sep); }
.add-row:active { background: var(--fill); }
.add-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.add-icon .icon { width: 22px; height: 22px; }
.add-text { flex: 1; display: flex; flex-direction: column; }
.add-text b { font-weight: 800; letter-spacing: -0.03em; }
.add-text small { color: var(--text-2); font-size: 13px; font-weight: 500; }
.help-link { display: flex; margin: 14px auto 0; color: var(--text); }
.help p { margin: 0 0 14px; }
.help-block { background: #fff; border-radius: var(--r-cell); padding: 14px 16px; margin: 0 0 12px; }
.help-block h4 { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.04em; }
.help-block ol { margin: 0; padding-left: 20px; }
.help-block li { margin: 4px 0; }

.filters { display: flex; flex-direction: column; gap: 20px; }
.filter-section h4 { margin: 0 0 8px; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.filter-section .chip { background: #fff; }
.filter-section .chip.on { background: var(--accent); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 78px);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
body.no-tabs .toasts { bottom: calc(92px + var(--safe-bottom)); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 520px;
  padding: 13px 18px; border-radius: 999px; background: #111; color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2); animation: toast-in 0.25s ease-out;
}
.toast.error { background: var(--red); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.toast-action { color: #fff; font-weight: 800; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- inloggen ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; padding: calc(28px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)); max-width: 520px; margin: 0 auto; }
.login .large-title { font-size: 56px; margin: 0; }
.login .shape { width: 78%; align-self: center; margin: 18px 0; color: #111; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.login-form .cell { padding: 0; }
.login-form .input { background: #fff; border-radius: 0; min-height: 54px; padding: 0 18px; }
.form-error { color: var(--red); margin: 0; min-height: 1.2em; font-size: 15px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.switch { position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--fill-2); flex: none; transition: background 0.2s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch.on { background: #111; }
.switch.on .knob { transform: translateX(20px); }

/* ================= Geld ================= */
:root {
  --vast-bg: #dde3ec;
  --flex-bg: #eee3d4;
  --green-bg: #dbeadf;
  --amber: #8f5300;     /* ≥ 4,5:1 op --bg en wit */
  --amber-bar: #c98a2e;
  --in: #1b7a4f;        /* bijschrijvingen */
  --brand: #1f5c43;
}
.cells, .sheet, .banner, .disclosure, .searchbar, .segmented, .mini-seg { color: var(--text); }
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.in { color: var(--in); }
body.hide-amounts .amt { filter: blur(7px); }
.warn-text { color: var(--amber) !important; }
.mt { margin-top: 14px; }
.small { font-size: 13px; }
.wide-link { display: flex; margin: 14px auto 0; justify-content: center; }
.small-btn { min-height: 38px; padding: 0 14px; font-size: 15px; }
.stack-btns { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 360px; }

/* categorie-icoon: rondje in de kleur van de categorie */
.cat-ic { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.cat-ic .icon { width: 20px; height: 20px; }
.cat-ic.none { background: transparent; color: var(--amber); box-shadow: inset 0 0 0 2px var(--amber-bar); }
.cat-ic.small { width: 26px; height: 26px; }
.cat-ic.small .icon { width: 15px; height: 15px; }
.cat-ic.big { width: 64px; height: 64px; }
.cat-ic.big .icon { width: 32px; height: 32px; }

/* Vandaag */
.hero-free { margin: 8px 0 18px; }
.free-title { font-size: 54px; margin-bottom: 14px; }
.free-title .t1 small, .free-title .t1 small { font-size: 0.5em; letter-spacing: -0.03em; }
.free-title .t2 { font-size: 24px; letter-spacing: -0.035em; margin-top: 6px; line-height: 1.1; }
.pace { margin: 0 0 8px; }
.pace-track { position: relative; height: 16px; border-radius: 8px; background: var(--fill); overflow: visible; }
.pace-fill { display: block; height: 100%; border-radius: 8px; background: var(--brand); max-width: 100%; transition: width 0.5s ease; }
.pace.krap .pace-fill { background: var(--amber-bar); }
.pace-mark { position: absolute; top: -5px; width: 3px; height: 26px; border-radius: 2px; background: var(--text); transform: translateX(-1.5px); }
.pace-legend { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); font-weight: 600; margin-top: 8px; }
.pace-text { margin: 4px 0 0; font-size: 15px; color: var(--text-2); font-weight: 600; }
.pace-text.krap { color: var(--amber); }
.home-cards { display: flex; flex-direction: column; gap: 10px; }
.card-btn { display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; transition: transform 0.12s; }
.card-btn:active { transform: scale(0.985); }
.card-btn > .chev, .card-head .chev { color: inherit; opacity: 0.6; }
.card-btn:not(:has(.card-head)) { flex-direction: row; align-items: center; justify-content: space-between; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card.dark { --card-bg: #111; --card-ink: #fff; --card-ink-2: #b8b8b4; color: #fff; }
.card.vast { --card-bg: var(--vast-bg); --card-ink-2: #4c5566; }
.card.flex { --card-bg: var(--flex-bg); --card-ink-2: #6b5a45; }
.card.income-card { --card-bg: var(--green-bg); --card-ink-2: #3d5a48; }
.card-title .amt { font-size: inherit; }
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.mini-row.bar-row { grid-template-columns: 26px 1fr auto; }
.mini-date { color: var(--card-ink-2); font-size: 13px; font-weight: 700; }
.mini-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-direction: column; gap: 4px; }
.mini-bar { display: block; height: 5px; border-radius: 3px; }
.import-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 0; padding: 12px 14px; border-radius: var(--r-cell); background: var(--cell); font-size: 14px; font-weight: 600; color: var(--text-2); }
.import-row.stale { color: var(--amber); }
.period-hint { margin-top: 14px; }

/* transacties */
.tx-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; text-align: left; }
button.tx-row:active { background: var(--fill); }
.tx-row + .tx-row::before { content: ''; position: absolute; top: 0; left: 62px; right: 14px; height: 1px; background: var(--sep); }
.tx-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.tx-text b { font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-text small { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-row.unknown .tx-text small { color: var(--amber); font-weight: 700; }
.tx-row.excluded { opacity: 0.5; }
.tx-row.excluded .tx-amt { text-decoration: line-through; }
.tx-amt { font-weight: 700; font-size: 16px; }
.day { margin: 0 0 14px; }
.day-head { display: flex; justify-content: space-between; padding: 0 4px 6px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.day-head span:first-child { color: var(--page-ink); }
.list-summary { margin: -4px 0 12px; font-size: 14px; font-weight: 600; }
.accept-btn { margin: 0 0 14px; }

/* detailblad */
.tx-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 4px 0 18px; }
.tx-hero-title { margin: 6px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -0.04em; }
.tx-hero-amt { font-size: 38px; font-weight: 800; letter-spacing: -0.045em; }
.tx-hero p { margin: 0; font-size: 14px; }
.small-cells .cell { min-height: 42px; padding: 9px 16px; font-size: 14px; }
.info-cell { align-items: flex-start; }
.info-value { text-align: right; word-break: break-word; max-width: 68%; font-weight: 600; }
.tx-detail .group { margin-top: 18px; }
.tx-detail .cells + .cells { margin-top: 10px; }

/* categorie kiezen */
.picker-body { display: flex; flex-direction: column; gap: 16px; }
.cat-group h4 { margin: 0 0 8px 4px; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-2); }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 520px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 18px; background: #fff; font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; letter-spacing: -0.01em; transition: transform 0.1s; }
.cat-btn:active { transform: scale(0.95); }
.cat-btn.on { box-shadow: inset 0 0 0 2.5px var(--text); }
.always { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-cell); background: #fff; }
.always-text { flex: 1; display: flex; flex-direction: column; }
.always-text small { color: var(--text-2); font-size: 13px; }

/* plan */
.plan-sum { display: flex; flex-direction: column; gap: 14px; margin: 0 0 6px; }
.plan-sum-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--card-ink-2); }
.proposal .tx-text { background: none; }
.yesno { display: flex; gap: 8px; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.round-btn .icon { width: 20px; height: 20px; }
.round-btn.yes { background: var(--brand); color: #fff; }
.round-btn.no { background: var(--fill); color: var(--text); }
.round-btn:active { transform: scale(0.92); }
.more-details summary { cursor: pointer; list-style: none; }
.more-details summary::-webkit-details-marker { display: none; }
.more-details summary::after { content: ' ›'; color: var(--text-3); }
.more-details[open] summary::after { content: ' ⌄'; }

/* inzicht */
.ins-row { position: relative; display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 14px; text-align: left; }
.ins-row + .ins-row::before { content: ''; position: absolute; top: 0; left: 62px; right: 14px; height: 1px; background: var(--sep); }
.ins-row:active { background: var(--fill); }
.ins-main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ins-main b { font-weight: 700; letter-spacing: -0.02em; }
.ins-main small { font-size: 13px; }
.ins-track { position: relative; height: 8px; border-radius: 4px; background: var(--fill); }
.ins-track i { display: block; height: 100%; border-radius: 4px; }
.ins-normal { position: absolute; top: -4px; width: 2px; height: 16px; border-radius: 1px; background: var(--text); transform: translateX(-1px); }

/* importeren */
.bank-chips { margin: 0 0 16px; }
.steps { margin: 0 0 16px; }
.steps li { margin: 6px 0; }
.col-pick { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 10px 16px !important; }
.col-pick small { font-size: 13px; color: var(--text-2); font-weight: 500; }
.col-pick.on small { color: inherit; opacity: 0.8; }
.done .done-shape { width: 120px; color: var(--brand); }
.done h2 { font-size: 34px; }
.ask { display: flex; flex-direction: column; gap: 12px; }
.big-input { font-size: 30px; font-weight: 800; min-height: 60px; letter-spacing: -0.03em; }

/* welkom */
.welcome .shape { width: 62%; }
.welcome-points { display: flex; flex-direction: column; gap: 14px; margin: 0 0 22px; }
.point { display: flex; gap: 14px; align-items: flex-start; }
.point-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.point > span:last-child { display: flex; flex-direction: column; }
.point b { font-weight: 800; letter-spacing: -0.03em; }
.point small { color: var(--text-2); font-size: 14px; }

/* bankkoppeling */
.warn-card { --card-bg: #f6e7cf; --card-ink-2: #7a4c0c; margin: 0 0 12px; }
.warn-card p { margin: 4px 0 0; font-size: 15px; }
.bank-card { display: flex; flex-direction: column; gap: 12px; margin: 0 0 12px; --card-bg: var(--green-bg); --card-ink-2: #3d5a48; }
.bank-card.expired { --card-bg: #f6e7cf; --card-ink-2: #7a4c0c; }
.bank-card .card-head .icon { width: 28px; height: 28px; }
.bank-acc { grid-template-columns: 1fr auto; }
.bank-acc .mini-name small { font-size: 12px; font-weight: 600; }
.setup-steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.setup-step { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-cell); background: var(--cell); }
.setup-step.ok { opacity: 0.75; }
.setup-step.ok .point-n { background: var(--in); }
.setup-step .point-n .icon { width: 16px; height: 16px; }
.setup-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.setup-body > b { font-weight: 800; letter-spacing: -0.03em; font-size: 18px; }
.setup-body p { margin: 0; font-size: 15px; color: var(--text-2); }
.setup-body .cells { width: 100%; background: var(--bg); }
.copy-cell { text-align: left; }
.copy-cell:active { background: var(--fill); }
.copy-cell .info-value { font-size: 13px; word-break: break-all; }
.icon.done-check { width: 72px; height: 72px; color: var(--in); }
.row.wrap { flex-wrap: wrap; }
.wide-stack { max-width: none; }
