/* =========================================================================
   Hondenopvang – stylesheet (mobile first). Kleuren staan in themes.css.
   ========================================================================= */
:root {
  --axis-w: 44px;
  --head-h: 58px;
  --hour-h: 44px;
  --col-w: 140px;
  --radius: 12px;
  --tap: 44px;
  --nav-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Statuskoppeling: één plek die elke status-klasse aan zijn variabelen hangt */
.st-aangevraagd { --accent: var(--st-aangevraagd-accent); --sbg: var(--st-aangevraagd-bg); --sfg: var(--st-aangevraagd-fg); }
.st-bevestigd   { --accent: var(--st-bevestigd-accent);   --sbg: var(--st-bevestigd-bg);   --sfg: var(--st-bevestigd-fg); }
.st-lopend      { --accent: var(--st-lopend-accent);      --sbg: var(--st-lopend-bg);      --sfg: var(--st-lopend-fg); }
.st-afgerond    { --accent: var(--st-afgerond-accent);    --sbg: var(--st-afgerond-bg);    --sfg: var(--st-afgerond-fg); }
.st-geannuleerd { --accent: var(--st-geannuleerd-accent); --sbg: var(--st-geannuleerd-bg); --sfg: var(--st-geannuleerd-fg); }
.pay-open    { --pbg: var(--pay-open-bg);    --pfg: var(--pay-open-fg); }
.pay-deels   { --pbg: var(--pay-deels-bg);   --pfg: var(--pay-deels-fg); }
.pay-betaald { --pbg: var(--pay-betaald-bg); --pfg: var(--pay-betaald-fg); }
.pay-nvt     { --pbg: var(--surface-2);      --pfg: var(--muted); }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); overscroll-behavior: none; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; cursor: pointer; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--tap); padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-small { min-height: 36px; padding: 0 .8rem; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  border: 0; border-radius: 999px; background: transparent; color: var(--text); padding: 0;
}
.btn:active, .icon-btn:active { transform: scale(.97); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: .5rem 0; }

/* ---------- Formulieren ---------- */
.field { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 .85rem; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-size: .85rem; font-weight: 600; color: var(--muted); padding: 0; }
.field input, .field select, .field textarea, .input {
  min-height: var(--tap); width: 100%; padding: .5rem .75rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.form-error { color: var(--danger); font-weight: 600; margin: .25rem 0 .75rem; }
.check { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.segmented { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; flex-wrap: wrap; }
.segmented > label, .segmented > button { flex: 1 1 auto; position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span, .segmented > button {
  display: grid; place-items: center; min-height: 38px; padding: 0 .7rem; border-radius: 9px; font-weight: 600;
  border: 0; background: transparent; cursor: pointer; white-space: nowrap;
}
.segmented input:checked + span, .segmented > button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); }

/* ---------- Opstart en inloggen ---------- */
.splash { position: fixed; inset: 0; display: grid; place-items: center; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-view { min-height: 100dvh; display: grid; place-items: center; padding: 1.25rem; }
.login-card { width: min(380px, 100%); background: var(--surface); border-radius: 18px; padding: 1.75rem 1.25rem; box-shadow: var(--shadow); }
.login-card h1 { margin: .5rem 0 0; font-size: 1.6rem; }
.login-logo { width: 56px; height: 56px; border-radius: 14px; background: var(--primary); color: var(--primary-text); display: grid; place-items: center; font-size: 30px; }

/* ---------- App-layout ---------- */
.app-view { display: flex; flex-direction: column; height: 100dvh; }
.topbar {
  flex: none; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: var(--safe-top) max(6px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left)); z-index: 50;
}
.topbar-row { display: flex; align-items: center; gap: 4px; min-height: 54px; }
.topbar h1 { font-size: 1.1rem; margin: 0 0 0 .4rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { font-weight: 800; display: flex; align-items: center; gap: 6px; margin-right: .5rem; }
.main-nav { display: none; }
.view { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.view-inner { max-width: 1100px; margin: 0 auto; padding: 12px 12px calc(var(--nav-h) + 24px + var(--safe-bottom)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-bottom);
}
.tabbar a {
  min-height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; position: relative;
}
.tabbar a[aria-current="page"] { color: var(--primary); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.tab-count {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--danger); color: #fff; font-size: .68rem; display: grid; place-items: center;
}
.fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--nav-h) + 16px + var(--safe-bottom));
  width: 58px; height: 58px; border-radius: 50%; border: 0; z-index: 61;
  background: var(--primary); color: var(--primary-text); box-shadow: var(--shadow-lg); display: grid; place-items: center;
}
.fab svg.i { width: 28px; height: 28px; stroke-width: 2.5; }

/* ---------- Kaarten en lijsten ---------- */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 1rem; margin: 0 0 .6rem; display: flex; align-items: center; gap: 8px; }
.card h2 .count { margin-left: auto; font-size: .85rem; color: var(--muted); font-weight: 600; }
.cards { display: grid; gap: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line-soft); }
.list > li:last-child { border-bottom: 0; }
.list-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 2px; min-height: 52px; width: 100%;
  background: none; border: 0; text-align: left; color: inherit; text-decoration: none;
}
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .sub { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); padding: .6rem 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); flex: none; object-fit: cover; display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input { flex: 1; min-width: 160px; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); border: 1px solid var(--line-soft); }
.stat b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .82rem; color: var(--muted); font-weight: 600; }

/* ---------- Badges (status heeft altijd icoon + label) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--sbg, var(--surface-2)); color: var(--sfg, var(--text)); border: 1px solid var(--accent, transparent); white-space: nowrap;
}
.badge svg.i { width: 13px; height: 13px; stroke-width: 2.6; }
.badge.pay { background: var(--pbg); color: var(--pfg); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.badge.plain { background: var(--surface-2); color: var(--text); border-color: transparent; }
.notice { background: var(--warn-bg); color: var(--warn-fg); border-radius: 10px; padding: 10px 12px; margin: 0 0 .8rem; font-size: .9rem; }
.notice.ok { background: var(--pay-betaald-bg); color: var(--pay-betaald-fg); }
.notice.err { background: var(--pay-open-bg); color: var(--pay-open-fg); }

/* ---------- Kalender: weekbord (dagkolommen met tijdas, zoals Planner) ---------- */
.cal-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 6px 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-head .label { flex: 1; min-width: 120px; font-weight: 700; text-align: center; }
.cal-head .label small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.calendar-view { display: flex; flex-direction: column; height: 100%; }
.board { flex: 1; min-height: 0; position: relative; overflow: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--axis-w); -webkit-user-select: none; user-select: none; }
.board.no-snap { scroll-snap-type: none; }
.wgrid { display: grid; grid-template-columns: var(--axis-w) repeat(7, var(--col-w)); grid-template-rows: var(--head-h) var(--body-h); width: max-content; min-width: 100%; padding-bottom: calc(var(--nav-h) + 80px); }
.corner { position: sticky; top: 0; left: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.day-head { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px 6px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.day-head .dow { font-size: .75rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.day-head .dom { font-size: 1.05rem; font-weight: 750; }
.day-head .cnt { font-size: .74rem; color: var(--muted); }
.day-head.is-today .dom { color: var(--primary); }
.axis { position: sticky; left: 0; z-index: 20; background: var(--surface); border-right: 1px solid var(--line); }
.axis-label { position: absolute; right: 5px; transform: translateY(-50%); font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.axis-label:first-child { transform: none; }
.day-col {
  position: relative; scroll-snap-align: start; border-left: 1px solid var(--line); cursor: cell;
  background-image: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px var(--hour-h));
}
.day-col.is-today { background-color: color-mix(in srgb, var(--primary) 5%, transparent); }
.day-col.drop-target { background-color: color-mix(in srgb, var(--primary) 10%, transparent); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--now); z-index: 450; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--now); }

.stay-block {
  position: absolute; border-radius: 8px; background: var(--sbg); color: var(--sfg);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-left: 4px solid var(--accent);
  box-shadow: var(--shadow); overflow: clip; touch-action: pan-x pan-y; cursor: grab; font-size: .74rem; line-height: 1.25; padding: 2px 5px;
}
/* Label blijft in beeld bij lange (meerdaagse) blokken: overflow: clip maakt geen scrollcontainer, dus sticky werkt */
.stay-block .b-label { position: sticky; top: calc(var(--head-h) + 2px); }
.stay-block.cont-top { border-top-left-radius: 0; border-top-right-radius: 0; border-top-style: dashed; }
.stay-block.cont-bottom { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-style: dashed; }
.stay-block .b-head { display: flex; align-items: center; gap: 3px; font-weight: 700; font-size: .66rem; text-transform: uppercase; letter-spacing: .02em; }
.stay-block .b-head svg.i { width: 12px; height: 12px; color: var(--accent); stroke-width: 2.6; }
.stay-block .b-title { font-weight: 750; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stay-block .b-sub { opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stay-block.is-selected { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg); z-index: 400 !important; }
.stay-block.drag-source { opacity: .3; }
.stay-block .resize { position: absolute; left: 0; right: 0; bottom: -4px; height: 12px; cursor: ns-resize; touch-action: none; }
.stay-block .resize::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 26px; height: 4px; margin-left: -13px; border-radius: 2px; background: var(--accent); opacity: 0; }
.stay-block:hover .resize::after, .stay-block.is-selected .resize::after { opacity: .85; }
@media (pointer: coarse) {
  .stay-block .resize { display: none; }
  .stay-block.is-selected .resize { display: block; height: 30px; bottom: -15px; }
  .stay-block.is-selected .resize::after { bottom: 11px; width: 34px; height: 6px; margin-left: -17px; opacity: 1; }
}
.drag-preview { position: absolute; left: 3px; right: 3px; z-index: 500; pointer-events: none; border-radius: 8px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--sbg) 85%, transparent); color: var(--sfg); font-size: .75rem; font-weight: 700; padding: 2px 6px; }

/* ---------- Kalender: bezettingsbord (rij per hond) ---------- */
.occ { overflow: auto; flex: 1; min-height: 0; }
.occ-grid { display: grid; grid-template-columns: 150px repeat(var(--occ-days), minmax(var(--occ-col), 1fr)); width: max-content; min-width: 100%; padding-bottom: calc(var(--nav-h) + 80px); }
.occ-corner, .occ-day { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 3; }
.occ-corner { left: 0; z-index: 4; padding: 6px 8px; font-size: .8rem; color: var(--muted); font-weight: 700; display: flex; align-items: end; }
.occ-day { text-align: center; font-size: .72rem; padding: 4px 0; border-left: 1px solid var(--line-soft); }
.occ-day b { display: block; font-size: .95rem; }
.occ-day.is-weekend { background: var(--surface-2); }
.occ-day.is-today b { color: var(--primary); }
.occ-name { position: sticky; left: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line); padding: 6px 8px; min-height: 46px; display: flex; flex-direction: column; justify-content: center; }
.occ-name b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occ-name small { color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occ-row { position: relative; grid-column: 2 / -1; border-bottom: 1px solid var(--line-soft); min-height: 46px; background-image: linear-gradient(to right, var(--line-soft) 1px, transparent 1px); background-size: calc(100% / var(--occ-days)) 100%; }
.occ-bar {
  position: absolute; top: 7px; bottom: 7px; border-radius: 8px; background: var(--sbg); color: var(--sfg); border: 1px solid var(--accent);
  border-left-width: 4px; font-size: .74rem; font-weight: 700; padding: 0 6px; display: flex; align-items: center; gap: 4px;
  overflow: hidden; white-space: nowrap; cursor: pointer; text-align: left;
}
.occ-bar svg.i { width: 13px; height: 13px; color: var(--accent); }

/* ---------- Dialogen / bottom-sheets ---------- */
dialog.sheet {
  padding: 0; border: 0; margin: 0; max-width: 100%; max-height: 100%; width: 100%; background: var(--surface); color: var(--text);
  position: fixed; inset: auto 0 0 0; border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg); overscroll-behavior: contain;
}
dialog.sheet[open] { animation: sheet-up .22s cubic-bezier(.2, .8, .2, 1); }
dialog.sheet::backdrop { background: rgb(10 12 20 / .45); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
dialog.sheet-full { height: 100%; height: 100dvh; inset: 0; border-radius: 0; }
dialog.sheet-small { max-height: 88dvh; }
.sheet-inner { display: flex; flex-direction: column; height: 100%; max-height: inherit; }
.sheet-header { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; padding: calc(6px + var(--safe-top)) 8px 6px; border-bottom: 1px solid var(--line); }
.sheet-header h2 { margin: 0; font-size: 1.05rem; text-align: center; }
.sheet-header > :first-child { justify-self: start; }
.sheet-header > :last-child { justify-self: end; }
.sheet-body { flex: 1; overflow: auto; padding: 1rem 1rem 1.25rem; }
.sheet-body h3 { font-size: .95rem; margin: 1.3rem 0 .6rem; }
.sheet-body h3:first-child { margin-top: 0; }
.sheet-footer { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 8px 8px calc(8px + var(--safe-bottom)); border-top: 1px solid var(--line); }

/* Verblijf-editor */
.dog-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 4px 6px 4px 12px; margin: 0 6px 6px 0; font-weight: 600; }
.dog-chip button { width: 30px; height: 30px; }
.dog-rows .row { display: grid; grid-template-columns: 1fr 120px 40px; gap: 6px; align-items: center; margin-bottom: 6px; }
.extra-rows .row { display: grid; grid-template-columns: 1fr 64px 100px 40px; gap: 6px; align-items: center; margin-bottom: 6px; }
.calc-box { background: var(--surface-2); border-radius: 12px; padding: 12px; margin: .4rem 0 1rem; }
.calc-box .total { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.calc-box .breakdown { font-size: .9rem; margin-top: 4px; word-break: break-word; }
.suggest { position: relative; }
.suggest-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 260px; overflow: auto; margin-top: 4px; }
.suggest-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; min-height: var(--tap); border: 0; background: none; border-bottom: 1px solid var(--line-soft); }
.suggest-list button:hover, .suggest-list button:focus { background: var(--surface-2); }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: .88rem; }
.history li.is-current { font-weight: 600; }
.history .meta { color: var(--muted); font-size: .8rem; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.data th, table.data td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.data th { color: var(--muted); font-weight: 700; font-size: .78rem; white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--surface-2); }
table.data tfoot td { font-weight: 800; border-top: 2px solid var(--line); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 84px + var(--safe-bottom)); z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; background: var(--toast-bg); color: var(--toast-fg); padding: 6px 6px 6px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .92rem; min-height: var(--tap); animation: toast-in .2s ease-out; }
.toast.is-error { background: #a61e1e; color: #fff; }
.toast button { background: transparent; border: 0; color: var(--toast-btn); font-weight: 700; min-height: 40px; padding: 0 10px; }
.toast.is-error button { color: #fff; text-decoration: underline; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Thema-keuze ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.theme-choice { position: relative; }
.theme-choice input { position: absolute; opacity: 0; }
.theme-choice span { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.theme-choice i { width: 26px; height: 26px; border-radius: 50%; flex: none; border: 1px solid rgb(0 0 0 / .15); }
.theme-choice input:checked + span { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.theme-choice input:checked + span::after { content: "✓"; margin-left: auto; color: var(--primary); font-weight: 800; }
.theme-choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.settings-nav { display: grid; gap: 8px; }
.pw-reveal { border: 2px solid var(--primary); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
pre.log { max-height: 50vh; overflow: auto; background: var(--surface-2); border-radius: 8px; padding: 10px; font-size: .75rem; white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }

/* ---------- Groter scherm ---------- */
@media (min-width: 700px) {
  dialog.sheet, dialog.sheet-full { inset: 0; margin: auto; width: min(680px, calc(100% - 32px)); height: fit-content; max-height: min(92dvh, 940px); border-radius: 16px; }
  dialog.sheet-full .sheet-inner { max-height: min(92dvh, 940px); }
  .stat-row { grid-template-columns: repeat(4, 1fr); }
  .theme-grid { grid-template-columns: repeat(4, 1fr); }
  .dash { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  :root { --nav-h: 0px; --axis-w: 52px; }
  .tabbar { display: none; }
  .main-nav { display: flex; gap: 2px; margin-left: .5rem; }
  .main-nav a { padding: 0 .8rem; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; position: relative; }
  .main-nav a[aria-current="page"] { background: var(--surface-2); color: var(--primary); }
  .main-nav .tab-count { top: -2px; left: auto; right: -2px; }
  .fab { bottom: calc(24px + var(--safe-bottom)); }
  .toasts { bottom: 100px; }
  .view-inner { padding-bottom: 48px; }
  .dash { grid-template-columns: 1fr 1fr 1fr; }
  .dash .wide { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .tabbar, .fab, .toasts { display: none !important; }
  .view { overflow: visible; }
}

/* Overleden honden */
.list-item.deceased .avatar { filter: grayscale(1); opacity: .75; }
.notice.deceased-note { background: var(--surface-2); color: var(--text); display: grid; gap: 6px; justify-items: start; margin-bottom: .8rem; }
.deceased-head { display: flex; gap: 8px; align-items: center; }
.deceased-head > .i { flex: none; }
