/* Tokens follow RailMonitor; --primary/--accent are overridden from site settings */
:root {
  --primary: #2F4A3A; --accent: #C9A45C;
  --primary-light: color-mix(in srgb, var(--primary) 82%, white);
  --primary-soft: color-mix(in srgb, var(--primary) 9%, white);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, white);
  --bg: #F4F5F2; --surface: #FFFFFF; --text: #1C211E; --muted: #6B736E; --border: #DFE3DD;
  --danger: #DC2626; --success: #16A34A;
  --sidebar-w: 236px; --radius: 10px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body { font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--primary); }
img { max-width: 100%; }
h1 { font-size: 28px; line-height: 1.2; color: var(--primary); }
h2 { font-size: 18px; color: var(--primary); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[data-lucide] { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--primary); color: #fff; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
/* beheeromgeving: blue sidebar so it's obvious you're not in the member portal */
.sidebar--beheer { background: #1E3A5F; }
.brand { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 16px 6px; color: #fff; text-decoration: none; }
.brand img { max-height: 80px; }
.brand svg { width: 56px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.brand svg .tree { stroke: var(--accent); }
.brand__name { font-size: 15px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1.2; }
.sidebar__group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.45); padding: 10px 22px 3px; }
.sidebar__item {
  display: flex; align-items: center; gap: 11px; padding: 6px 12px; margin: 1px 10px; border-radius: 8px; line-height: 1.35;
  color: rgba(255,255,255,.8); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: background .15s, color .15s;
}
/* short screens (laptops): tighten further so the menu never needs scrolling */
@media (min-width: 901px) and (max-height: 820px) {
  .brand { padding-top: 10px; }
  .sidebar__group { padding: 6px 22px 2px; }
  .sidebar__item { padding: 4px 12px; font-size: 14px; }
  .sidebar__bottom { padding: 8px 22px; }
}
@media (min-width: 901px) and (max-height: 690px) {
  .brand svg { display: none; }
  .sidebar__item { padding: 3px 12px; }
}
.sidebar__item [data-lucide] { width: 17px; height: 17px; }
.topbar__logo { display: none; }
.topbar__logo img { height: 40px; display: block; }
.sidebar__item:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar__item.active { background: rgba(255,255,255,.16); color: #fff; }
.sidebar__item .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 20px; font-size: 12px; padding: 0 8px; font-weight: 700; }
.sidebar__bottom { margin-top: auto; padding: 10px 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.sidebar__bottom a { color: rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.sidebar__bottom a:hover { color: #fff; }
.sidebar__bottom [data-lucide] { width: 15px; height: 15px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 28px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 20;
}
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; }
.search input { border: 0 !important; background: transparent !important; padding: 10px 0 !important; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; font-size: 13px; font-weight: 600; }
.lang a { padding: 5px 11px; text-decoration: none; color: var(--muted); }
.lang a.on { background: var(--primary); color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; text-decoration: none; }
.user-chip { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.content { padding: 28px; width: 100%; }
.burger { display: none; }
#nav-toggle { display: none; }
.scrim { display: none; }

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; margin-bottom: 18px; }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__header a { font-size: 14px; font-weight: 600; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 720px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius);
  font: 600 15px var(--font); cursor: pointer; border: none; text-decoration: none; transition: background .15s, border-color .15s; white-space: nowrap;
  text-transform: none; letter-spacing: normal; margin-bottom: 0; /* label.btn must not inherit label styling */
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-light); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--outline { background: var(--surface); border: 1.5px solid var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--danger { background: #fff; color: var(--danger); border: 1.5px solid #F3C4C4; }
.btn--danger:hover { background: #FEF2F2; }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--lg { padding: 15px 24px; font-size: 17px; }
.btn--ghost { background: none; color: var(--muted); padding: 6px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
label.check { display: flex; gap: 10px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); font-weight: 500; cursor: pointer; }
label.check input { width: 20px; height: 20px; accent-color: var(--primary); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time],
input[type=datetime-local], input[type=search], input[type=number], input[type=file], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius); font: 16px var(--font);
  color: var(--text); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
select { appearance: none; padding-right: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B736E' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; }
textarea { min-height: 120px; resize: vertical; }
input[type=color] { width: 64px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; background: #fff; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
details.de { border: 1px dashed var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
details.de summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details.de[open] summary { margin-bottom: 14px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge--success { background: #DCFCE7; color: var(--success); }
.badge--danger { background: #FEE2E2; color: var(--danger); }
.badge--warn { background: #FEF3C7; color: #B45309; }
.badge--info { background: #DBEAFE; color: #1D4ED8; }
.badge--muted { background: #F1F3F0; color: var(--muted); }
.badge--accent { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 60%, black); }

.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.flash.ok { background: #DCFCE7; color: #166534; }
.flash.err { background: #FEE2E2; color: #991B1B; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
thead th { background: var(--bg); padding: 10px 14px; text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBF9; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }

/* list rows (docs, posts, items) */
.row-list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.row:last-child { border-bottom: none; }
a.row:hover { background: #FAFBF9; }
.row__icon { width: 42px; height: 42px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.row__icon.folder { background: #FEF3C7; color: #D97706; }
.row__icon.pdf { background: #FEE2E2; color: #DC2626; }
.row__main { flex: 1; min-width: 0; }
.row__title { font-weight: 600; }
.row__meta { font-size: 13px; color: var(--muted); }

/* ---------- home ---------- */
.hero { position: relative; border-radius: 18px; overflow: hidden; min-height: 300px; background: center/cover no-repeat; display: flex; align-items: flex-end; margin-bottom: -56px; }
.hero__text { position: absolute; top: 30px; left: 34px; right: 34px; max-width: 640px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 2px 18px rgba(0,0,0,.45); }
.hero__text h1 { font-size: 38px; color: #fff; }
.hero__text p { font-size: 18px; margin-top: 6px; font-weight: 500; }
.tiles { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0 18px; margin-bottom: 22px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--text); box-shadow: 0 6px 24px rgba(20,30,25,.08); transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--primary); }
.tile__icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 12px; }
.tile__icon [data-lucide] { width: 22px; height: 22px; }
.tile b { display: block; font-size: 17px; }
.tile span { font-size: 14px; color: var(--muted); }
.news-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.news-item:last-child { border-bottom: none; }
.news-item img, .news-item .ph { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--primary-soft); }
.news-item b { display: block; line-height: 1.3; }
.news-item p { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.datebox { width: 64px; flex-shrink: 0; align-self: flex-start; text-align: center; border: 1px solid var(--border); border-radius: 12px; padding: 8px 0; background: var(--surface); }
.datebox b { display: block; font-size: 26px; line-height: 1; color: var(--primary); }
.datebox span { font-size: 12px; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.event { display: flex; gap: 16px; }
.event__meta { list-style: none; font-size: 14px; color: var(--muted); }
.event__meta li { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.quote { border-radius: 14px; background: center/cover; min-height: 150px; position: relative; overflow: hidden; display: flex; align-items: center; padding: 24px; }
.quote::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(255,255,255,.2)); }
.quote p { position: relative; font-size: 21px; color: var(--primary); max-width: 360px; line-height: 1.3; }

/* posts and pages sit directly on the page, no card around them */
.article { padding-top: 6px; }
.article .page-head h1 { font-size: 34px; }
.article .page-head { padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 22px !important; }
/* post editor (WordPress-style): sticky action bar, settings row, full-width editor */
.editbar { position: sticky; top: 68px; z-index: 15; display: flex; align-items: center; gap: 10px; margin: 0 -28px 18px; padding: 12px 28px;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.editbar__title { margin-right: auto; display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 17px; color: var(--primary); }
.editsettings { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 18px; padding-bottom: 4px; }
.pick-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.title-input { font-size: 26px !important; font-weight: 700; border: 0 !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; padding: 8px 0 !important; box-shadow: none !important; color: var(--primary); }
.editor--tall { min-height: 420px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg input { position: absolute; opacity: 0; }
.seg label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 16px; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--muted); }
.seg input:checked + label { background: var(--primary); color: #fff; }
.seg input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: -2px; }
@media (max-width: 900px) { .editbar { top: 60px; margin: 0 -16px 14px; padding: 10px 16px; } }
/* beheer > instellingen: tabs + save button, sticky like the post editor bar */
.settings-tabs { position: sticky; top: 68px; z-index: 15; display: flex; align-items: center; gap: 12px; margin: 0 -28px 18px; padding: 8px 28px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.settings-tabs .tabs { flex: 1; }
.settings-tabs .tabs a { display: flex; align-items: center; gap: 7px; }
@media (max-width: 900px) { .settings-tabs { top: 60px; margin: 0 -16px 14px; padding: 6px 16px; } }
/* beheer > mailing */
.mail-list { display: flex; flex-direction: column; gap: 8px; }
.mail { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.mail summary { display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.mail summary::-webkit-details-marker { display: none; }
.mail[open] summary { border-bottom: 1px solid var(--border); }
.mail__date { width: 150px; flex-shrink: 0; font-size: 14px; }
.mail__subj { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mail__subj b, .mail__subj span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail__body { padding: 14px 16px; }
.mail__body pre { white-space: pre-wrap; font: 15px/1.6 var(--font); margin: 0; }
@media (max-width: 600px) { .mail summary { flex-wrap: wrap; gap: 6px 10px; } .mail__date { width: auto; } .mail__subj { flex-basis: 100%; order: 3; } }
/* beheer > galerij */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.media-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.media-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--bg); }
.media-card__body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.media-card__body form { margin-top: 2px; }
.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .15s, border-color .15s; }
.dropzone.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
/* photo gallery (native <dialog>) */
.gallery { margin: auto; border: 0; border-radius: 16px; padding: 22px; width: min(960px, calc(100vw - 32px)); max-height: 85vh; }
.gallery::backdrop { background: rgba(0,0,0,.45); }
.gallery__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.gallery__head h2 { margin-right: auto; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.gallery__item { border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden; cursor: pointer; background: var(--bg); aspect-ratio: 4/3; }
.gallery__item:hover, .gallery__item:focus-visible { border-color: var(--primary); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; display: block; }
/* archived posts: only beheerders see them, greyed out */
.is-archived { opacity: .55; filter: grayscale(1); }
.is-archived:hover { opacity: .8; }
/* post */
.pdf-view { background: #E9ECE8; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.pdf-view canvas { width: 100%; height: auto; background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.post-cover { width: 100%; max-height: 380px; object-fit: cover; border-radius: 14px; margin-bottom: 20px; }
.prose { font-size: 17px; line-height: 1.7; }
.prose > * + * { margin-top: .8em; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li[data-list=bullet] { list-style-type: disc; } /* Quill 2 stores bullet lists as <ol> */
.prose .ql-ui { display: none; }
.prose img { border-radius: 10px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: border-color .15s; }
.post-card:hover { border-color: var(--primary); }
.post-card img, .post-card .ph { height: 170px; object-fit: cover; width: 100%; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary); }
.post-card div.body { padding: 16px 18px; }
.post-card p { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* choice tiles (melding categories) */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.choices input { position: absolute; opacity: 0; }
.choices label { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px 10px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); background: var(--surface); margin: 0; }
.choices label [data-lucide] { width: 28px; height: 28px; color: var(--primary); }
.choices input:checked + label { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.choices input:focus-visible + label { outline: 2px solid var(--primary); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--primary); border-color: var(--primary); }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login__img { background: center/cover; position: relative; }
.login__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--primary) 70%, transparent), transparent 50%); }
.login__img p { position: absolute; bottom: 36px; left: 40px; right: 40px; color: #fff; font-size: 24px; z-index: 1; line-height: 1.3; }
.login__form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--surface); }
.login__box { width: 100%; max-width: 400px; }
.login__box img.logo { max-width: 220px; display: block; margin: 0 auto 28px; }

/* admin dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border-radius: 14px; border: 1px solid var(--border); padding: 20px; text-decoration: none; color: var(--text); }
.stat-card__n { font-size: 34px; font-weight: 700; color: var(--primary); line-height: 1; margin: 8px 0 4px; }
.big-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 24px; }
.big-action { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 14px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; transition: background .15s; }
.big-action:hover { background: var(--primary-light); }
.big-action span { display: block; font-weight: 400; font-size: 13px; opacity: .8; }
.big-action [data-lucide] { width: 28px; height: 28px; }
.editor { background: #fff; border-radius: 0 0 var(--radius) var(--radius); min-height: 260px; font-size: 16px; }
.ql-toolbar.ql-snow { border-radius: var(--radius) var(--radius) 0 0; border-color: var(--border) !important; background: var(--bg); }
.ql-container.ql-snow { border-color: var(--border) !important; font-family: var(--font) !important; font-size: 16px !important; }
.member-card { display: flex; gap: 14px; align-items: flex-start; }
.member-card .avatar { width: 46px; height: 46px; font-size: 15px; flex-shrink: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  #nav-toggle:checked ~ .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  #nav-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
  .burger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); cursor: pointer; margin: 0; color: var(--primary); }
  .burger [data-lucide] { width: 24px; height: 24px; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .user-chip .name { display: none; }
  .topbar__logo { display: block; }
  .content { padding: 18px 16px; }
  .login { grid-template-columns: 1fr; }
  .login__img { min-height: 200px; }
  .login__img p { font-size: 18px; bottom: 20px; left: 20px; }
}
@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero { min-height: 290px; }
  .hero__text { left: 20px; right: 20px; top: 20px; }
  .hero__text h1 { font-size: 28px; }
  .hero__text p { font-size: 16px; }
  .tiles { padding: 0 10px; gap: 10px; }
  .tile { padding: 14px; }
  .tile span { display: none; }
  .search { display: none; }
  h1 { font-size: 24px; }
  .card { padding: 18px 16px; }
  .hide-sm { display: none; }
}
/* MFA setup on the login-style screen: compact so it fits without scrolling */
.login__box--wide { max-width: 560px; }
.login__box--wide img.logo { max-width: 150px; margin-bottom: 14px; }
.login__box--wide h1 { font-size: 24px; }
.mfa { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; margin-bottom: 16px; }
.mfa__qr img { width: 170px; height: 170px; display: block; border: 1px solid var(--border); border-radius: 10px; }
.mfa__qr summary { cursor: pointer; color: var(--muted); margin-top: 6px; }
.mfa-secret { font-family: monospace; font-size: 13px; margin-top: 4px; user-select: all; word-break: break-all; }
.mfa__steps { padding-left: 18px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.4; }
.mfa__form { display: flex; gap: 10px; }
.mfa__form input { flex: 1; font-size: 22px !important; letter-spacing: .25em; text-align: center; }
.mfa__skip { text-align: center; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.mfa__mobile { display: none; }
/* phone: no QR (you can't scan your own screen) but a button that opens the authenticator app; no photo */
@media (max-width: 600px) {
  .login:has(.login__box--wide) .login__img { display: none; }
  .mfa { grid-template-columns: 1fr; }
  .mfa__qr, .mfa__desktop { display: none; }
  .mfa__mobile { display: list-item; }
}
.sidebar__bottom a.powered { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 4px; }
.sidebar__bottom a.powered:hover { color: rgba(255,255,255,.8); }
/* flash messages as a toast top-right, so "Opgeslagen" is visible wherever you scrolled to */
.toast { position: fixed; top: 80px; right: 24px; z-index: 60; max-width: min(460px, calc(100vw - 32px)); margin: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.15); animation: toast-in .25s ease-out; transition: opacity .4s, transform .4s; }
.toast span { flex: 1; }
.toast__close { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; padding: 0 0 0 8px; }
.toast__close:hover { opacity: 1; }
.toast--out { opacity: 0; transform: translateY(-10px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }
@media (max-width: 600px) { .toast { top: 70px; right: 16px; left: 16px; } }
.btn--saved, .btn--saved:hover { background: var(--success) !important; color: #fff; }
/* beheer > lid: account & beveiliging */
.acct-status { display: grid; gap: 6px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.acct-status div { display: flex; justify-content: space-between; gap: 10px; }
.acct-actions { display: flex; flex-direction: column; gap: 14px; }
.acct-actions .btn { width: 100%; justify-content: flex-start; }
.acct-pw { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.acct-pw summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--primary); }
/* admin-only marker: small gold dot after things only administrators can see */
.admin-only::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: middle; flex-shrink: 0; }
.sidebar__item.admin-only::after { margin-left: auto; }
h1.admin-only::after { width: 9px; height: 9px; margin-left: 10px; }
/* beheer > audit log */
.audit-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 14px; }
.audit-filter input[type=search] { flex: 1; min-width: 220px; }
.audit-filter select { width: auto; min-width: 170px; }
.audit-date { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.audit-date input { width: 160px; }
.audit-detail { font-size: 14px; }
.audit-detail td { padding: 4px 12px 4px 0; border: 0; vertical-align: top; }
.audit-detail td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
/* audit log: van -> naar */
.audit-diff { font-size: 14px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.audit-diff th { font-size: 11px; padding: 6px 10px; }
.audit-diff td { padding: 6px 10px; vertical-align: top; white-space: pre-wrap; word-break: break-word; }
.audit-diff td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
.audit-from { background: #FEF2F2; color: #991B1B; text-decoration: line-through; text-decoration-color: rgba(153,27,27,.35); width: 45%; }
.audit-to { background: #F0FDF4; color: #166534; width: 45%; }
/* ---------- prikbord: cork board with sticky notes ---------- */
.cork {
  --cork: #C49A6C;
  background-color: var(--cork);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(90,55,25,.18) 0 1.5px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(255,235,200,.22) 0 1px, transparent 1.5px),
    radial-gradient(circle at 40% 80%, rgba(80,45,20,.2) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 85% 15%, rgba(255,240,210,.18) 0 1.3px, transparent 1.8px);
  background-size: 23px 19px, 17px 21px, 29px 27px, 13px 17px;
  border: 14px solid #8A5A32; border-radius: 10px;
  box-shadow: inset 0 0 40px rgba(60,35,15,.45), 0 8px 24px rgba(0,0,0,.15);
  padding: 34px 26px; min-height: 420px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 34px 26px; align-items: start;
}
.cork__empty { grid-column: 1 / -1; text-align: center; color: #fff; font-size: 18px; text-shadow: 0 1px 3px rgba(0,0,0,.4); padding: 60px 0; }
.note {
  position: relative; padding: 26px 18px 14px; min-height: 190px; color: #2B2B2B;
  box-shadow: 2px 6px 14px rgba(0,0,0,.28), inset 0 -18px 30px -24px rgba(0,0,0,.25);
  transform: rotate(-1.2deg); transition: transform .15s, box-shadow .15s;
  font-family: 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', var(--font);
}
.note:nth-child(3n) { transform: rotate(1.4deg); }
.note:nth-child(4n+1) { transform: rotate(-.4deg); }
.note:nth-child(5n+2) { transform: rotate(2deg); }
.note:hover, .note:target { transform: rotate(0) scale(1.03); z-index: 2; box-shadow: 4px 12px 24px rgba(0,0,0,.3); }
.note:target { outline: 3px solid #fff; }
.note--yellow { background: #FFF59D; } .note--pink { background: #F8BBD0; } .note--blue { background: #B3E5FC; }
.note--green { background: #C5E1A5; } .note--orange { background: #FFCC80; } .note--purple { background: #D1C4E9; }
.pin {
  position: absolute; top: -9px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FF8A80, #D32F2F 55%, #8E1B1B);
  box-shadow: 2px 3px 4px rgba(0,0,0,.4);
}
.pin::after { content: ''; position: absolute; left: 9px; top: 16px; width: 2px; height: 7px; background: linear-gradient(#999, #555); border-radius: 1px; }
.note:nth-child(4n+2) .pin { background: radial-gradient(circle at 35% 30%, #90CAF9, #1565C0 55%, #0D3C7A); }
.note:nth-child(4n+3) .pin { background: radial-gradient(circle at 35% 30%, #A5D6A7, #2E7D32 55%, #164A19); }
.note h3 { font-size: 18px; line-height: 1.25; margin-bottom: 6px; color: #1F1F1F; }
.note__cat { display: inline-block; font-family: var(--font); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: rgba(0,0,0,.08); border-radius: 10px; padding: 1px 8px; margin-bottom: 6px; }
.note__photo img { width: 100%; max-height: 170px; object-fit: cover; border: 4px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); margin: 4px 0 8px; display: block; }
.note__body { white-space: pre-line; font-size: 15px; line-height: 1.45; margin-bottom: 12px; word-break: break-word; }
.note__foot { font-family: var(--font); font-size: 12.5px; color: rgba(0,0,0,.7); border-top: 1px dashed rgba(0,0,0,.2); padding-top: 8px; }
.note__foot a { color: inherit; }
.note__meta { margin-top: 3px; color: rgba(0,0,0,.5); }
.note__actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.note:hover .note__actions, .note:focus-within .note__actions { opacity: 1; }
.note__actions button { background: rgba(255,255,255,.6); border: 0; border-radius: 6px; padding: 4px; cursor: pointer; color: #333; display: grid; place-items: center; }
.note__actions button:hover { background: #fff; }
.note__actions [data-lucide] { width: 15px; height: 15px; }
@media (hover: none) { .note__actions { opacity: 1; } } /* touch screens have no hover */
.note-dlg { margin: auto; border: 0; border-radius: 16px; padding: 22px; width: min(560px, calc(100vw - 32px)); }
.note-dlg::backdrop { background: rgba(0,0,0,.45); }
.note-dlg__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.swatches { display: flex; gap: 10px; }
.swatches input { position: absolute; opacity: 0; }
.swatches label { width: 36px; height: 36px; border-radius: 8px; cursor: pointer; margin: 0; border: 2px solid rgba(0,0,0,.12); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.swatches input:checked + label { outline: 3px solid var(--primary); outline-offset: 2px; }
.swatches input:focus-visible + label { outline: 3px dashed var(--primary); outline-offset: 2px; }
@media (max-width: 600px) { .cork { border-width: 8px; padding: 24px 14px; gap: 26px; } }
/* prikbord page: the cork fills the whole content area, no white edges */
.content--bleed { padding: 0; }
.content--bleed .cork { display: block; border: 0; border-radius: 0; min-height: calc(100vh - 68px); padding: 34px 36px 60px;
  box-shadow: inset 0 8px 30px rgba(60,35,15,.35), inset 0 0 80px rgba(60,35,15,.25); }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 38px 28px; align-items: start; }
/* title card taped onto the board */
.board-card { position: relative; max-width: 560px; margin: 4px 0 42px 6px; padding: 26px 28px 20px; background: #FFFDF6;
  background-image: repeating-linear-gradient(transparent 0 27px, rgba(80,120,190,.14) 27px 28px); background-position: 0 58px;
  box-shadow: 2px 8px 18px rgba(0,0,0,.28); transform: rotate(-.8deg); }
.board-card::before { content: ''; position: absolute; top: 0; bottom: 0; left: 18px; width: 1px; background: rgba(220,90,90,.35); } /* margin line */
.board-card h1 { font-family: 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', var(--font); font-size: 34px; color: #2B3A33; }
.board-card p { margin: 6px 0 16px; font-size: 16px; line-height: 28px; color: #3B3B3B; }
.board-card__foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tape { position: absolute; top: -12px; width: 92px; height: 26px; background: rgba(255,248,220,.72); border: 1px solid rgba(0,0,0,.05);
  box-shadow: 0 1px 3px rgba(0,0,0,.12); backdrop-filter: blur(1px); }
.tape--l { left: -18px; transform: rotate(-24deg); }
.tape--r { right: -18px; transform: rotate(22deg); }
.content--bleed .cork__empty { padding: 30px 0 60px; text-align: left; }
@media (max-width: 900px) {
  .content--bleed .cork { min-height: calc(100vh - 60px); padding: 26px 16px 40px; }
  .board-card { margin: 4px 4px 34px; padding: 22px 20px 16px; }
  .board-card h1 { font-size: 28px; }
}
