/* Kleren — rustig wit, Apple-stijl. Kleur alleen op de grote hoofdacties:
   blauw = toevoegen · indigo = kiezen/plannen · groen = ik draag dit · teal = was gedaan. */

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

:root {
  --bg: #ffffff;
  --bg-grouped: #f2f2f7;
  --cell: #ffffff;
  --tile: #f3f3f6;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.2);
  --text: #1c1c1e;
  --text-2: #6c6c70;
  --text-3: #aeaeb2;
  --sep: rgba(60, 60, 67, 0.16);
  --blue: #007aff;
  --indigo: #5856d6;
  --green: #248a3d;
  --teal: #0e8a9e;
  --red: #d70015;
  --radius: 14px;
  --radius-s: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(54px + var(--safe-bottom));
  --nav-h: calc(48px + var(--safe-top));
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.06);
  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(--bg);
  color: var(--text);
  font: 17px/1.35 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  touch-action: manipulation;
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
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 color-mix(in srgb, var(--blue) 45%, transparent); 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; }

/* ---------- opstart ---------- */
.boot { height: 100dvh; }

/* ---------- navigatiebalk + grote titel ---------- */
.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;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s, box-shadow 0.2s;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0.5px 0 var(--sep);
}
.nav-title { font-weight: 600; font-size: 17px; 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(--text); border-radius: 22px;
}
.nav-btn .icon { width: 24px; height: 24px; }
.nav-btn.text { padding: 0 8px; font-size: 17px; }
.nav-btn.back { padding-left: 0; gap: 0; }
.nav-btn:active { opacity: 0.5; }
.large-title { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
.page { padding: 4px 16px 0; max-width: 760px; margin: 0 auto; }
.subtitle { color: var(--text-2); margin: -6px 0 16px; text-transform: none; }

/* ---------- 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(5, 1fr);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -0.5px 0 var(--sep);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-3); font-size: 10.5px; font-weight: 500; letter-spacing: 0;
}
.tab .icon { width: 26px; height: 26px; }
.tab.on { color: var(--text); }
.tab:active { opacity: 0.6; }

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: var(--radius);
  font-weight: 600; font-size: 17px; transition: transform 0.12s, opacity 0.12s;
}
.btn:active { transform: scale(0.97); opacity: 0.85; }
.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; }
.btn.grey { background: var(--fill); color: var(--text); }
.btn.icon-only { width: 50px; padding: 0; flex: none; }
.danger-text { color: var(--red) !important; }
.link { color: var(--blue); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; }
.link.small { font-size: 13px; padding: 4px 0; }
.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: 50px; padding: 0 20px 0 16px;
  border-radius: 25px; font-weight: 600; color: #fff; box-shadow: 0 6px 20px rgba(0, 122, 255, 0.32);
  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: 2px; border-radius: 9px; background: var(--fill); margin: 0 0 12px;
}
.seg {
  flex: 1; height: 32px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--text);
  transition: background 0.2s, box-shadow 0.2s;
}
.seg.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); font-weight: 600; }
.cell .segmented { margin: 0; min-width: 180px; }
.mini-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); }
.mini-seg button { height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.mini-seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 600; }
.mini-seg.center { display: flex; width: max-content; margin: 10px auto 0; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 34px; padding: 0 14px; border-radius: 17px; background: var(--fill);
  font-size: 15px; font-weight: 500; 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(--text); color: #fff; }
.chip.soft { background: transparent; box-shadow: inset 0 0 0 1px var(--sep); }
.chip.soft.on { background: var(--text); color: #fff; box-shadow: none; }
.chips-label { align-self: center; font-size: 13px; color: var(--text-2); min-width: 64px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25); flex: none; }
.chip.on .dot { box-shadow: 0 0 0 1.5px #fff; }
.color-chip.main { box-shadow: inset 0 0 0 1.5px var(--text); background: #fff; }
.add-color { width: 34px; padding: 0; justify-content: center; }
.add-color:has(span) { width: auto; padding: 0 14px 0 10px; }
.active-filters { margin: -4px 0 12px; }
.active-filters:empty { display: none; }

/* ---------- zoeken ---------- */
.searchbar {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px;
  background: var(--fill); border-radius: 10px; margin: 0 0 12px; color: var(--text-2);
}
.searchbar .icon { width: 18px; height: 18px; }
.search-input { flex: 1; border: 0; background: none; outline: none; height: 100%; font-size: 17px; color: var(--text); }
.search-input::placeholder { color: var(--text-2); }
.search-input::-webkit-search-cancel-button { opacity: 0.5; }

/* ---------- raster ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 740px) { .grid { grid-template-columns: repeat(5, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile:active .pic { transform: scale(0.97); }
.tile-name { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.pic {
  position: relative; aspect-ratio: 1; border-radius: var(--radius); background: var(--tile);
  overflow: hidden; transition: transform 0.15s;
}
.pic img { width: 100%; height: 100%; object-fit: contain; }
.pic.cut img { padding: 9%; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08)); }
.pic.orig img { object-fit: cover; }
.pic.busy::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  background-size: 250% 100%; animation: shine 1.4s linear infinite;
}
@keyframes shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.busy-label {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 1;
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.9); font-size: 11px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.busy-label .icon { width: 13px; height: 13px; }
.busy-label.warn { color: var(--red); }
.empty-slot:empty { display: none; }

/* ---------- 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: 10px 12px; border-radius: var(--radius);
  background: var(--bg-grouped);
}
.banner.upload { flex-direction: column; align-items: stretch; gap: 8px; }
.banner-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.banner-text b { font-size: 15px; }
.banner-text small { font-size: 13px; color: var(--text-2); }
.progress { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 2px; transition: width 0.3s; }
.stack { display: flex; height: 40px; flex: none; }
.stack .pic { width: 40px; height: 40px; flex: none; border-radius: 9px; box-shadow: 0 0 0 2px var(--bg-grouped); }
.stack .pic + .pic { margin-left: -14px; }
.stack .pic.cut img { padding: 4px; }
.stack .busy-label { display: none; }

/* ---------- lege staat ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 24px; }
.empty h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -0.01em; }
.empty p { margin: 0 0 8px; color: var(--text-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 (zoals iOS-instellingen) ---------- */
.group { margin: 18px 0 0; }
.group-title { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-2); margin: 0 0 6px 16px; }
.cells { background: var(--cell); border-radius: var(--radius-s); overflow: hidden; box-shadow: 0 0 0 0.5px var(--sep); }
.detail .cells, .inbox-page .cells, .sheet .cells { box-shadow: none; }
.cell {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 10px 16px; width: 100%; text-align: left;
}
.cell + .cell::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 0.5px; background: var(--sep); }
.cell.stacked { flex-direction: column; align-items: stretch; gap: 8px; }
.cell-value { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.nav-cell:active { background: var(--fill); }
.field-label { font-size: 15px; font-weight: 500; display: flex; align-items: baseline; gap: 6px; }
.cell.stacked .field-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field-unit { font-size: 12px; color: var(--text-3); font-weight: 400; }
.roadmap small { color: var(--indigo); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.roadmap span { color: var(--text-2); font-size: 15px; }

/* grijze achtergrond op schermen met gegroepeerde lijsten */
body:has(.detail), body:has(.inbox-page) { background: var(--bg-grouped); }
body:has(.detail) .nav.scrolled, body:has(.inbox-page) .nav.scrolled { background: rgba(242, 242, 247, 0.85); }

/* ---------- invoer ---------- */
.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px;
  background: var(--fill); outline: none; font-size: 17px;
}
.input:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 50%, transparent); }
.input.bad { box-shadow: 0 0 0 2px var(--red); }
.input.short { width: 110px; }
textarea.input { resize: vertical; line-height: 1.4; }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c6c70' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 18px; }
.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; flex: none; }
.money { text-align: right; max-width: 140px; }
.cell.inline .with-unit { justify-content: flex-end; }
.inline-label { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 15px; }
.inline-label .select { width: 92px; }
.chips.suggest { flex-wrap: wrap; margin-top: 8px; }
.chips.suggest:empty { display: none; }
.date-field, .size-field, .care, .composition { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* datum- en maandveld: de browser geeft ze een eigen minimale breedte; binnen de kaart houden */
.cell, .field { min-width: 0; }
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; }
.comp-row { display: grid; grid-template-columns: 1fr 96px 36px; gap: 8px; align-items: center; }
.pct { text-align: right; }
.hint.bad { color: var(--red); }

.stepper { display: flex; align-items: center; gap: 6px; }
.step { width: 40px; height: 36px; border-radius: 9px; background: var(--fill); font-size: 22px; font-weight: 500; }
.step:active { background: var(--fill-2); }
.stepper-mid { min-width: 64px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.stepper-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper-value.muted { color: var(--text-2); font-weight: 500; }
.stepper-hint { font-size: 11px; color: var(--text-3); }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale-step { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 10px; background: var(--fill); }
.scale-step b { font-size: 17px; }
.scale-step small { font-size: 11px; color: var(--text-2); }
.scale-step.on { background: var(--text); color: #fff; }
.scale-step.on small { color: rgba(255, 255, 255, 0.75); }
.scale-step.soft.on { background: var(--fill-2); color: var(--text); }
.scale-step.soft.on small { color: var(--text-2); }

.disclosure {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin: 18px 0 0; padding: 14px 16px; border-radius: var(--radius-s); background: var(--cell);
  color: var(--blue); font-size: 16px;
}
.rot90 { transform: rotate(90deg); }
.rot-90 { transform: rotate(-90deg); }

/* ---------- verwerken ---------- */

.inbox-page { padding-bottom: calc(100px + var(--safe-bottom)); }
.stage { max-width: 420px; margin: 4px auto 0; }
.stage .pic { border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.stage .pic.cut img { padding: 6%; }
.cat-picker { display: flex; flex-direction: column; gap: 14px; background: var(--cell); border-radius: var(--radius-s); padding: 14px 12px; }
.cat-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; margin: 0 0 8px 2px; }
.cat-head .icon { width: 18px; height: 18px; }
.inbox-page .chips.colors, .detail .chips.colors { flex-wrap: wrap; background: var(--cell); border-radius: var(--radius-s); padding: 12px; }
.color-chip { background: var(--fill); }
.inbox-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(242, 242, 247, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -0.5px 0 var(--sep);
}
.inbox-footer > * { max-width: 728px; margin: 0 auto; }
.done-mark { width: 72px; height: 72px; border-radius: 36px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; }
.done-mark .icon { width: 40px; height: 40px; }

/* ---------- detail ---------- */
.carousel-wrap { position: relative; max-width: 460px; margin: 0 auto; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; border-radius: 0; background: #fff; }
.slide.cut img { padding: 6%; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); opacity: 0.5; }
.dots i.on { background: var(--text); opacity: 1; }
.title-block { margin: 18px 4px 0; }
.name-input {
  width: 100%; border: 0; background: none; outline: none; padding: 2px 0;
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
}
.name-input:focus { box-shadow: 0 2px 0 var(--blue); }
.title-block p { margin: 2px 0 0; font-size: 15px; }
.stats-note { display: flex; gap: 8px; align-items: center; margin: 18px 4px 0; font-size: 13px; color: var(--text-2); }
.stats-note .icon { width: 16px; height: 16px; }
.danger-zone { margin: 28px 0 8px; }

/* ---------- vandaag ---------- */
.card { background: var(--bg-grouped); border-radius: var(--radius); padding: 16px; }
.hero { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; }
.hero-num { font-size: 48px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero b { display: block; }
.hero small { color: var(--text-2); font-size: 14px; }

/* ---------- 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.32); }
.sheet {
  width: 100%; max-width: 640px; max-height: calc(var(--vv-h, 100dvh) - var(--safe-top) - 24px);
  display: flex; flex-direction: column;
  background: var(--bg-grouped); border-radius: 14px 14px 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: 22px; display: flex; justify-content: center; align-items: center; touch-action: none; }
.sheet-grab::before { content: ''; width: 36px; 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 16px 8px; touch-action: none; }
.sheet-title { grid-column: 2; font-weight: 600; }
.sheet-done { grid-column: 3; justify-self: end; color: var(--blue); font-weight: 600; 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 8px calc(8px + 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: rgba(255, 255, 255, 0.96); border-radius: 14px; overflow: hidden; }
.actions-title { margin: 0; padding: 12px 16px; text-align: center; font-size: 13px; color: var(--text-2); background: rgba(255, 255, 255, 0.96); border-radius: 14px 14px 0 0; }
.actions-title + .actions-group { border-radius: 0 0 14px 14px; box-shadow: 0 -0.5px 0 var(--sep); }
.action { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; font-size: 19px; color: var(--blue); }
.action + .action::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 0.5px; background: var(--sep); }
.action .icon { width: 20px; height: 20px; }
.action.danger { color: var(--red); }
.action.checked { font-weight: 600; }
.action-check { position: absolute; right: 16px; }
.action.cancel { background: #fff; border-radius: 14px; font-weight: 600; }
.action:active { background: var(--fill); }

.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px 6px; background: #fff; border-radius: var(--radius-s); padding: 14px 8px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.swatch:disabled { opacity: 0.3; }
.swatch-dot { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25); transition: transform 0.1s; }
.swatch.on .swatch-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text); }
.swatch:active .swatch-dot { transform: scale(0.9); }
.swatch-name { font-size: 12px; color: var(--text-2); }

.add-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; position: relative; }
.add-row + .add-row::before { content: ''; position: absolute; top: 0; left: 64px; right: 0; height: 0.5px; background: var(--sep); }
.add-row:active { background: var(--fill); }
.add-icon { width: 36px; height: 36px; border-radius: 9px; 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 small { color: var(--text-2); font-size: 13px; }
.help-link { display: flex; margin: 14px auto 0; }
.help p { margin: 0 0 14px; }
.help-block { background: #fff; border-radius: var(--radius-s); padding: 12px 16px; margin: 0 0 12px; }
.help-block h4 { margin: 0 0 6px; }
.help-block ol { margin: 0; padding-left: 20px; }
.help-block li { margin: 4px 0; }

.filters { display: flex; flex-direction: column; gap: 18px; }
.filter-section h4 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.02em; font-weight: 500; }
.filter-section .chip { background: #fff; }
.filter-section .chip.on { background: var(--text); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 76px);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
body.no-tabs .toasts { bottom: calc(90px + var(--safe-bottom)); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 520px;
  padding: 12px 16px; border-radius: 14px; background: rgba(28, 28, 30, 0.92); color: #fff; font-size: 15px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2); animation: toast-in 0.25s ease-out;
}
.toast.error { background: rgba(160, 0, 16, 0.94); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.toast-action { color: #64d2ff; font-weight: 600; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- inloggen ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg-grouped); text-align: center; }
.login h1 { font-size: 34px; margin: 14px 0 2px; letter-spacing: -0.02em; }
.login .muted { margin: 0 0 28px; }
.app-mark { width: 84px; height: 84px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; color: var(--text); }
.app-mark .icon { width: 50px; height: 50px; }
.login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.login-form .cell { padding: 0; }
.login-form .input { background: #fff; border-radius: 0; min-height: 50px; padding: 0 16px; }
.form-error { color: var(--red); margin: 0; min-height: 1.2em; font-size: 15px; }

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