/* Checkronde design-systeem
   Kleuren, componenten en app-shell. Publieke marketing-styling zit in public.css,
   module-specifieke styling in eigen css-bestanden. */

:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-light: #eef2ff;
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-hover: 0 4px 12px rgba(16, 24, 40, .10);
  --shadow-lg: 0 10px 30px rgba(17, 24, 39, .12);
  --ring: 0 0 0 2px var(--card), 0 0 0 4px var(--brand);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Het hidden-attribuut moet altijd winnen, ook van .badge/.btn met display. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p { line-height: 1.6; }
small { font-size: 13px; }
.lead { font-size: 18px; color: var(--muted); line-height: 1.55; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }

/* ------------------------------------------------------------------ */
/* Knoppen */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-align: center;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { text-decoration: none; }
/* Tactiele druk-respons: knop zakt licht in bij indrukken */
.btn:active { transform: translateY(1px); }
.btn:disabled:active { transform: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------------ */
/* Formulieren */
/* ------------------------------------------------------------------ */

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink-soft); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], input[type="url"],
input[type="tel"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  /* 16px voorkomt dat iOS Safari inzoomt bij focus op een veld */
  font-size: 16px;
  font-family: var(--font);
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #cbd2dc; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
input:disabled, select:disabled, textarea:disabled { background: #f9fafb; color: var(--muted); cursor: not-allowed; }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checkbox-row input { width: auto; }

/* ------------------------------------------------------------------ */
/* Kaarten, tabellen, badges, alerts */
/* ------------------------------------------------------------------ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 16px; margin-bottom: 12px; font-weight: 700; }
/* Klikbare kaarten krijgen een zachte hover-lift */
a.card:hover, .card-hover:hover, button.card:hover {
  box-shadow: var(--shadow-hover); border-color: #d7dbe2; transform: translateY(-2px); text-decoration: none;
}

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line);
  color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfc; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-muted { background: #f3f4f6; color: var(--muted); }
.badge-brand { background: var(--brand-light); color: var(--brand); }

/* Alert / notice: identieke component. .notice(-info) volgt exact .alert(-info)
   zodat het rapport en de app geen afwijkende meldingen tonen. */
.alert, .notice {
  padding: 12px 16px 12px 15px; border-radius: var(--radius-sm); margin-bottom: 16px;
  font-size: 14px; line-height: 1.5; border: 1px solid; border-left-width: 4px;
}
.alert p, .notice p { line-height: 1.5; }
.alert strong, .notice strong { font-weight: 700; }
.alert-success { background: var(--success-bg); color: #166534; border-color: #bbf7d0; border-left-color: var(--success); }
.alert-error, .alert-danger { background: var(--danger-bg); color: #991b1b; border-color: #fecaca; border-left-color: var(--danger); }
.alert-info, .notice, .notice-info { background: var(--brand-light); color: var(--brand-dark); border-color: #c7d2fe; border-left-color: var(--brand); }
.alert-warning { background: var(--warning-bg); color: #92400e; border-color: #fde68a; border-left-color: var(--warning); }

/* ------------------------------------------------------------------ */
/* Tabs: onderstreepte 'segmented' navigatie (canoniek).               */
/* .tabs en .tab-nav delen exact dezelfde look zodat Beheer/Meldingen   */
/* identiek ogen. Module-CSS mag dit later fijn-tunen.                  */
/* ------------------------------------------------------------------ */
.tabs, .tab-nav {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.tabs a, .tab-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; margin-bottom: -1px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0;
  min-height: 40px;
  transition: color .15s, border-color .15s, background .15s;
}
.tabs a:hover, .tab-nav a:hover { color: var(--ink); background: var(--brand-light); text-decoration: none; }
.tabs a.is-active, .tab-nav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* ------------------------------------------------------------------ */
/* Voortgang, stats, modal, toast */
/* ------------------------------------------------------------------ */

.progress { background: var(--line); border-radius: 999px; height: 10px; overflow: hidden; }
.progress-bar { background: var(--success); height: 100%; border-radius: 999px; transition: width .3s; }
.progress-bar.is-low { background: var(--danger); }
.progress-bar.is-mid { background: var(--warning); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.stat .stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat .stat-label { font-size: 13px; color: var(--muted); }
.stat .stat-value.is-good { color: var(--success); }
.stat .stat-value.is-bad { color: var(--danger); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .5);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-backdrop.is-open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); max-width: 480px; width: 100%; padding: 24px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-bottom: 12px; }

#toast-holder { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ */
/* Headers: publiek en app */
/* ------------------------------------------------------------------ */

.logo { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.logo span { color: var(--brand); }
.logo:hover { text-decoration: none; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
/* Inloggen neutraal houden zodat de indigo CTA-knop ernaast echt opvalt */
.site-nav .nav-login { color: var(--ink); font-weight: 600; }
.site-nav .btn-primary { color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .35); }
.site-nav .btn-primary:hover { background: var(--brand-dark); }

.app-header { background: var(--ink); position: sticky; top: 0; z-index: 50; }
.app-header .logo { color: #fff; }
.app-header .logo span { color: #818cf8; }
.app-header-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; min-height: 56px; flex-wrap: wrap; }
.app-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.app-nav a { color: #d1d5db; font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 6px; }
.app-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.app-nav a.is-active { color: #fff; background: rgba(255, 255, 255, .14); }
.logout-form { display: inline; }
.nav-logout { background: none; border: none; color: #9ca3af; font-size: 13px; cursor: pointer; padding: 6px 10px; font-family: var(--font); }
.nav-logout:hover { color: #fff; }

.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: inherit; }
.site-header .nav-toggle { color: var(--ink); }
.app-header .nav-toggle { color: #fff; }

/* Rood carry-over-paneel: bijzonderheden en gemiste taken van de vorige dienst */
.carryover { background: var(--danger-bg); border: 1.5px solid #fca5a5; border-left: 5px solid var(--danger); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.carryover-head { display: flex; align-items: center; gap: 10px; color: #991b1b; font-size: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.carryover-head strong { min-width: 0; overflow-wrap: anywhere; }
.carryover-icon { width: 22px; height: 22px; border-radius: 50%; background: var(--danger); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.carryover-note { background: #fff; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.carryover-note-text { color: #7f1d1d; font-weight: 600; overflow-wrap: anywhere; }
.carryover-meta { color: #b91c1c; font-size: 12px; }
.carryover-note-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.carryover-missed-title { color: #991b1b; font-weight: 700; font-size: 14px; margin: 8px 0 6px; }
.carryover-list { list-style: none; margin: 0; padding: 0; }
.carryover-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed #fecaca; }
.carryover-list li:last-child { border-bottom: none; }
.carryover-task { font-weight: 600; color: #7f1d1d; min-width: 0; overflow-wrap: anywhere; }
.carryover-reason { min-width: 0; overflow-wrap: anywhere; }
.carryover-zone { font-size: 12px; background: #fff; border: 1px solid #fecaca; color: #b91c1c; padding: 1px 8px; border-radius: 999px; }
.carryover-reason { font-size: 13px; color: #b91c1c; font-style: italic; }
.carryover-link { display: inline-block; margin-top: 10px; color: var(--danger); font-weight: 600; font-size: 14px; }

/* Impersonatie-balk: superadmin beheert een tenant */
.impersonation-bar { background: #b45309; color: #fff; position: sticky; top: 56px; z-index: 45; }
.impersonation-bar-inner { max-width: 1080px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.impersonation-text { font-size: 14px; }
.impersonation-form { display: inline; }
.impersonation-exit { background: #fff; color: #b45309; border: none; font-weight: 600; }
.impersonation-exit:hover { background: #fef3c7; }

/* ------------------------------------------------------------------ */
/* App-shell: zijbalk (desktop) + slanke topbalk (telefoon/tablet)      */
/* ------------------------------------------------------------------ */
.app-sidebar { display: none; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; background: var(--ink); position: sticky; top: 0; z-index: 50; padding: 0 16px; min-height: 54px; }
.app-topbar .logo { color: #fff; }
.app-topbar .logo span { color: #818cf8; }
.topbar-bell { position: relative; color: #d1d5db; display: inline-flex; padding: 8px; }
.topbar-bell:hover { color: #fff; }
.topbar-bell .bn-badge { top: 2px; right: 2px; }

@media (min-width: 861px) {
  .app-topbar { display: none; }
  .app-sidebar {
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; width: 248px; height: 100vh;
    background: var(--ink); z-index: 50; padding: 18px 14px; overflow-y: auto;
  }
  .side-logo { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.02em; padding: 6px 10px 18px; }
  .side-logo span { color: #818cf8; }
  .side-logo:hover { text-decoration: none; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #cbd2dc; font-size: 14.5px; font-weight: 500; }
  .side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
  .side-link.is-active { background: var(--brand); color: #fff; }
  .side-link .ic { flex-shrink: 0; opacity: .95; }
  .side-link span { flex: 1; min-width: 0; }
  .side-badge { flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; border-radius: 999px; }
  .side-link.is-active .side-badge { background: #fff; color: var(--brand); }
  .side-group-label { color: #6b7280; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 16px 12px 6px; }
  .side-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; margin-top: 10px; }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; }
  .side-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
  .side-user-meta { min-width: 0; }
  .side-user-name { color: #fff; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-user-role { color: #9ca3af; font-size: 12px; }
  .side-foot-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: none; border: none; color: #cbd2dc; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; }
  .side-foot-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
  .side-foot-back { color: #fbbf24; }
  .app-shell-main { margin-left: 248px; }
  .impersonation-bar { top: 0; }
}

.app-body { overflow-x: hidden; } /* voorkomt dat brede inhoud de vaste onderbalk verbreedt */
.app-main { padding: 24px 0 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head h1 .ic { vertical-align: -4px; margin-right: 6px; color: var(--brand); }

/* Zichtbare focus voor toetsenbord-navigatie (toegankelijkheid).
   Consistente 2px brand-ring op alle interactieve elementen. */
.btn:focus-visible, a:focus-visible, .side-link:focus-visible, .bn-item:focus-visible,
.tab-nav a:focus-visible, .tabs a:focus-visible, summary:focus-visible, .chore-seen:focus-visible,
button:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px;
}
/* Formuliervelden: ring zonder hun eigen hoekradius te overschrijven */
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}
.app-sidebar a:focus-visible, .side-foot-btn:focus-visible, .app-topbar a:focus-visible { outline-color: #fff; }

/* Ruimere tapdoelen op telefoon/tablet */
@media (max-width: 860px) {
  .btn-sm { min-height: 40px; }
}

/* ------------------------------------------------------------------ */
/* Footer publiek */
/* ------------------------------------------------------------------ */

.site-footer { background: var(--ink); color: #9ca3af; padding: 40px 0 24px; margin-top: 64px; }
.site-footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.logo-footer { color: #fff; }
.footer-tagline { font-size: 14px; margin-top: 4px; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: #9ca3af; font-size: 14px; }
.footer-nav a:hover { color: #fff; }
.footer-copy { margin-top: 24px; font-size: 13px; color: #6b7280; }

/* ------------------------------------------------------------------ */
/* Hulpklassen */
/* ------------------------------------------------------------------ */

.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-muted { color: var(--muted); }
.text-small { font-size: 13px; }
.text-center { text-align: center; }
.w-100 { width: 100%; }

/* ------------------------------------------------------------------ */
/* Mobiel */
/* ------------------------------------------------------------------ */

@media (max-width: 860px) {
  .site-header .nav-toggle { display: block; }
  /* Mobiel: nette witte uitklap onder de header (niet in de balk geperst). */
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(17, 24, 39, .14);
    padding: 8px 16px 14px;
  }
  .site-nav.is-open { display: flex; animation: site-nav-drop .16s ease-out; }
  .site-nav a { padding: 13px 12px; border-radius: 10px; font-size: 16px; }
  .site-nav a:not(.btn):hover, .site-nav a:not(.btn):active { background: var(--bg); color: var(--ink); }
  .site-nav .nav-login { margin-top: 2px; }
  .site-nav .btn-primary { margin-top: 8px; text-align: center; justify-content: center; padding-top: 12px; padding-bottom: 12px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
@keyframes site-nav-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ */
/* Iconen */
/* ------------------------------------------------------------------ */
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.nav-logout .ic { vertical-align: -3px; }

/* ------------------------------------------------------------------ */
/* Mobiele onderbalk (app) + Meer-sheet                                */
/* ------------------------------------------------------------------ */
.bottom-nav { display: none; }
.sheet-backdrop { display: none; }

@media (max-width: 860px) {
  /* Op telefoon/tablet: bovenbalk-links weg, onderbalk als knoppen. */
  .app-header .app-nav { display: none; }
  .app-header-inner { justify-content: center; }
  .impersonation-bar { position: static; }

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(17, 24, 39, .07);
  }
  .bn-item {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 8px 2px 6px; min-height: 58px;
    background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font);
    text-decoration: none; -webkit-tap-highlight-color: transparent;
  }
  .bn-item span:not(.bn-icon-wrap):not(.bn-badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bn-item .ic { width: 24px; height: 24px; }
  .bn-item.is-active { color: var(--brand); }
  .bn-item:active { background: var(--brand-light); }
  .bn-icon-wrap { position: relative; display: inline-flex; }
  .bn-badge {
    position: absolute; top: -5px; right: -8px; background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
  }
  .app-main { padding-bottom: 88px; }
}

.sheet-backdrop.is-open { display: flex; position: fixed; inset: 0; background: rgba(17, 24, 39, .5); z-index: 70; align-items: flex-end; justify-content: center; }
.sheet {
  background: #fff; width: 100%; max-width: 540px; border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); animation: sheet-up .22s ease-out;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { width: 40px; height: 4px; background: var(--line); border-radius: 999px; margin: 8px auto 14px; }
.sheet-user { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; border-bottom: 1px solid var(--line); }
.sheet-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.sheet-name { font-weight: 700; }
.sheet-links { display: flex; flex-direction: column; padding: 8px 0; }
.sheet-links a { display: flex; align-items: center; gap: 14px; padding: 14px 8px; color: var(--ink); font-weight: 500; border-radius: 10px; }
.sheet-links a:hover, .sheet-links a:active { background: var(--bg); text-decoration: none; }
.sheet-links .ic, .sheet-logout .ic { color: var(--muted); }
.sheet-logout { border-top: 1px solid var(--line); margin-top: 4px; }
.sheet-logout button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 8px; background: none; border: none; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; text-align: left; border-radius: 10px; }
.sheet-logout button:hover { background: var(--bg); }

/* ------------------------------------------------------------------ */
/* Toegankelijkheid: respecteer 'verminder beweging' app-breed.        */
/* Dempt alle transities/animaties voor gebruikers die dat instellen.  */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active { transform: none; }
  a.card:hover, .card-hover:hover, button.card:hover { transform: none; }
}
