/* Plantick: één stylesheet, geen build-stap. Kleuren staan als variabelen bovenaan. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url(/static/fonts/open-sans-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url(/static/fonts/open-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --hover: #eceef5;
  --border: #e3e6ee;
  --border-strong: #c9cedc;
  --text: #323338;
  --muted: #676879;
  --primary: #0073ea;
  --primary-hover: #0060c2;
  --primary-soft: #e5f1ff;
  --danger: #d83a52;
  --danger-soft: #fdecee;
  --ok-soft: #e6f7ef;
  --status-empty: #c4c4c4;
  --row: #ffffff;
  --row-hover: #f5f7fb;
  --selected: #e5f1ff;
  --shadow: 0 8px 28px rgba(25, 30, 60, .14), 0 1px 3px rgba(25, 30, 60, .08);
  --radius: 8px;
  --row-h: 38px;
  --sidebar-w: 252px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181b34;
    --surface: #23263f;
    --surface-2: #2b2f4b;
    --hover: #33385a;
    --border: #3a3e5c;
    --border-strong: #4d5275;
    --text: #e2e4ea;
    --muted: #9da0b5;
    --primary: #2e8bff;
    --primary-hover: #5aa3ff;
    --primary-soft: #1c3260;
    --danger: #f0627a;
    --danger-soft: #45222c;
    --ok-soft: #173d33;
    --status-empty: #5a5e78;
    --row: #2b2f4b;
    --row-hover: #33385a;
    --selected: #1c3260;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #181b34;
  --surface: #23263f;
  --surface-2: #2b2f4b;
  --hover: #33385a;
  --border: #3a3e5c;
  --border-strong: #4d5275;
  --text: #e2e4ea;
  --muted: #9da0b5;
  --primary: #2e8bff;
  --primary-hover: #5aa3ff;
  --primary-soft: #1c3260;
  --danger: #f0627a;
  --danger-soft: #45222c;
  --ok-soft: #173d33;
  --status-empty: #5a5e78;
  --row: #2b2f4b;
  --row-hover: #33385a;
  --selected: #1c3260;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ basis */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.block { display: block; }
.pad { padding: 12px; }
.spacer { flex: 1; }
.only-mobile { display: none !important; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ knoppen & velden */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--hover); }
.btn .icon { width: 17px; height: 17px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger-ghost { border-color: transparent; background: transparent; color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; height: 42px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; color: var(--muted);
  position: relative; flex: none;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm .icon { width: 16px; height: 16px; }
.icon-btn.xs { width: 26px; height: 26px; }
.icon-btn.xs .icon { width: 16px; height: 16px; }
.link-btn { color: var(--primary); font-weight: 600; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--surface); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.sm { height: 32px; font-size: 13px; }
.field-label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.field-label small { font-weight: 400; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.check.small { font-size: 12.5px; gap: 6px; }
.stack { display: grid; gap: 14px; }
.alert { background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; }
.notice { background: var(--ok-soft); padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; line-height: 1.7; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11.5px; font-weight: 600; color: var(--muted); vertical-align: middle; }
.tag.blue { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.copyable { cursor: pointer; }
.copyable:hover { outline: 1px dashed var(--primary); }
.copyable.big { font-size: 22px; letter-spacing: .15em; padding: 2px 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

/* avatars */
.avatar {
  --av: #579bfc;
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--av); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.avatar-sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar-more { background: var(--muted); }
.guest-avatar { background: var(--muted); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--row); }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

/* ------------------------------------------------------------------ app-layout */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); letter-spacing: -.01em; }
.brand.big { font-size: 22px; margin-bottom: 18px; }
/* logo: een vinkje (plan + tick) */
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark rect { fill: var(--primary); }
.brand-mark path { fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.brand.big .brand-mark { width: 34px; height: 34px; }
.side-links { display: grid; gap: 2px; padding: 4px 10px; }
.side-link, .side-board {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px;
  color: var(--text); font-size: 14px; min-width: 0;
}
.side-link:hover, .side-board:hover { background: var(--hover); }
.side-link.active, .side-board.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.side-link .icon, .side-board .icon { color: var(--muted); }
.side-link.active .icon, .side-board.active .icon { color: var(--primary); }
.side-board span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-section {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 12px 6px 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.side-section-actions { display: flex; gap: 2px; }
.side-boards { flex: 1; overflow-y: auto; padding: 0 10px 12px; display: grid; align-content: start; gap: 1px; }
.side-folder summary {
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 4px; border-radius: 6px; cursor: pointer;
  list-style: none; font-weight: 600; color: var(--text); user-select: none;
}
.side-folder summary::-webkit-details-marker { display: none; }
.side-folder summary:hover { background: var(--hover); }
.side-folder summary .icon { color: var(--muted); width: 16px; height: 16px; }
.side-folder summary .folder-icon { color: var(--fc, var(--muted)); fill: color-mix(in srgb, var(--fc, transparent) 22%, transparent); }
.side-list { display: grid; gap: 1px; min-height: 6px; }
.side-list .side-board.sortable-ghost { background: var(--primary-soft); }
.side-folder .chev { transition: transform .15s; }
.side-folder[open] .chev { transform: rotate(90deg); }
.side-folder .folder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-folder .folder-menu { opacity: 0; }
.side-folder summary:hover .folder-menu { opacity: 1; }
.side-folder .side-board { padding-left: 30px; }
.side-empty { display: block; padding: 4px 10px 4px 30px; color: var(--muted); font-size: 12.5px; }
.sidebar-foot { display: flex; align-items: center; gap: 4px; padding: 10px 10px 12px; border-top: 1px solid var(--border); }
.me { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); padding: 4px 6px; border-radius: 6px; }
.me:hover { background: var(--hover); }
.me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.theme-light { display: none; }
[data-theme="dark"] .theme-dark { display: none; }
[data-theme="dark"] .theme-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dark { display: none; }
  :root:not([data-theme="light"]) .theme-light { display: block; }
}
.scrim { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; flex: none; }
.topbar-spacer { flex: 1; }
.bell .badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.content {
  flex: 1; min-height: 0; overflow: auto;
  background: var(--surface); margin: 0 12px 12px; border-radius: 12px; border: 1px solid var(--border);
}

/* ------------------------------------------------------------------ pagina's */
.page { padding: 28px 32px 48px; max-width: 1200px; }
.page.narrow { max-width: 640px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head p { margin-top: 4px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 28px 0 12px; }
.section-title .icon { color: var(--muted); }
.section-title .folder-icon { color: var(--fc, var(--muted)); fill: color-mix(in srgb, var(--fc, transparent) 22%, transparent); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.home-section + .home-section { margin-top: 8px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.board-card {
  display: flex; gap: 12px; padding: 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); transition: border-color .12s, box-shadow .12s, transform .12s;
}
.board-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.board-card-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); flex: none; }
.board-card-body { display: grid; gap: 2px; min-width: 0; }
.board-card-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty-state { text-align: center; padding: 64px 16px; display: grid; justify-items: center; gap: 10px; }
.empty-state.small { padding: 36px 16px; }
.empty-illu { width: 64px; height: 64px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 6px; }
.empty-illu .icon { width: 30px; height: 30px; }

.table-card { padding: 0; overflow: hidden; }
.simple-table { width: 100%; border-collapse: collapse; }
.simple-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.simple-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.simple-table tr:last-child td { border-bottom: 0; }
.simple-table tr.inactive td { opacity: .55; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions form { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.add-user { margin-bottom: 16px; padding: 0; }
.add-user > summary { list-style: none; margin: 14px; display: inline-flex; }
.add-user > summary::-webkit-details-marker { display: none; }
.add-user[open] > summary { margin-bottom: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; padding: 16px; align-items: end; }
.grid-form-checks { display: grid; gap: 8px; padding-bottom: 8px; }

/* inloggen */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.auth-card h1 { font-size: 22px; }
.pin-input { height: 54px; font-size: 26px; letter-spacing: .5em; text-align: center; }

/* ------------------------------------------------------------------ bord */
.board-page { padding: 22px 0 120px; min-height: 100%; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px; }
.board-title-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.private-badge { color: var(--muted); display: grid; }
.board-title {
  font-size: 24px; font-weight: 700; border: 1px solid transparent; border-radius: 6px; padding: 2px 8px; margin-left: -9px;
  background: transparent; outline: none; min-width: 0; width: 100%; max-width: 640px; text-overflow: ellipsis;
}
.board-title:hover { border-color: var(--border-strong); }
.board-title:focus { border-color: var(--primary); }
.board-title.static { margin-left: 0; padding-left: 0; }
.board-actions { display: flex; align-items: center; gap: 4px; }
.board-desc {
  display: block; width: calc(100% - 56px); max-width: 720px; margin: 2px 28px 0 19px; padding: 3px 8px;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); outline: none;
}
.board-desc:hover { border-color: var(--border); }
.board-desc:focus { border-color: var(--primary); color: var(--text); }
p.board-desc { margin-left: 28px; padding-left: 0; }

.toolbar { display: flex; align-items: center; gap: 8px; padding: 16px 28px 8px; flex-wrap: wrap; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--muted);
}
.search:focus-within { border-color: var(--primary); }
.search input { border: 0; outline: none; background: transparent; width: 170px; color: var(--text); }
.search.mini { display: flex; height: 34px; margin: 4px 4px 6px; }
.search.mini input { width: 100%; }
.pill-select {
  height: 36px; padding: 0 30px 0 12px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none; cursor: pointer; max-width: 180px;
}

.board-scroll { overflow-x: auto; padding: 4px 28px 0; }
.groups { display: grid; gap: 34px; min-width: max-content; padding-top: 14px; }
.group { --gc: #579bfc; }
.group-head { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; width: fit-content; max-width: 90vw; }
.group-head.draggable { cursor: grab; border-radius: 6px; padding-right: 4px; }
.group-grip { color: var(--muted); opacity: 0; display: grid; margin-left: -22px; width: 20px; }
.group-head:hover .group-grip { opacity: 1; }
.collapse-btn { color: var(--gc); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; }
.collapse-btn:hover { background: var(--hover); }
.collapse-btn .icon { transition: transform .15s; }
.group-name {
  color: var(--gc); font-weight: 700; font-size: 17px; border: 1px solid transparent; border-radius: 6px;
  padding: 1px 6px; background: transparent; outline: none; field-sizing: content; min-width: 60px; max-width: 520px;
}
.group-name:hover { border-color: var(--border-strong); }
.group-name:focus { border-color: var(--primary); }
.group-count { color: var(--muted); font-size: 13px; margin: 0 6px; }
.group.collapsed .collapse-btn .icon { transform: rotate(-90deg); }
.group.collapsed .group-table > :not(.head-row) { display: none; }
.group.collapsed .head-row .cell:not(.name-cell) { visibility: hidden; }

.row { display: grid; grid-template-columns: var(--grid); min-height: var(--row-h); }
.cell {
  display: flex; align-items: center; justify-content: center; min-width: 0; min-height: var(--row-h);
  background: var(--row); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  font-size: 13.5px; position: relative;
}
.name-cell {
  justify-content: flex-start; gap: 4px; padding: 0 8px 0 6px;
  border-left: 6px solid var(--gc);
}
.head-row .cell { background: var(--surface); color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.head-row .cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px; }
.head-row .name-cell { border-top-left-radius: 6px; padding-left: 12px; }
.head-row .name-cell span { padding-left: 4px; }
.head-row .cell.clickable { cursor: pointer; }
.head-row .cell.clickable:hover { background: var(--hover); color: var(--text); }
.end-cell { border-right: 0; background: transparent !important; border-bottom-color: transparent; }
.head-row .end-cell { border-top-color: transparent; }

.item-row:hover .cell:not(.end-cell):not(.c-status), .sub-row:hover .cell:not(.end-cell):not(.c-status) { background-color: var(--row-hover); }
.item-row.selected .cell:not(.end-cell):not(.c-status), .sub-row.selected .cell:not(.end-cell):not(.c-status) { background-color: var(--selected); }

.drag-handle { color: var(--muted); opacity: 0; display: grid; place-items: center; width: 16px; margin-left: -2px; }
.drag-zone { cursor: grab; }
.click-edit[readonly] { cursor: inherit; }
.click-edit[readonly]:hover { border-color: transparent; background: transparent; }
.item-row:hover .click-edit[readonly], .sub-row:hover .click-edit[readonly] { text-decoration: underline dotted var(--border-strong); text-underline-offset: 4px; }
.drag-handle .icon { width: 16px; height: 16px; }
.row:hover .drag-handle { opacity: .8; }
.select, .select-group { width: 15px; height: 15px; accent-color: var(--primary); margin: 0 4px 0 0; flex: none; cursor: pointer; }
.sub-toggle {
  display: inline-flex; align-items: center; gap: 1px; height: 24px; padding: 0 3px; border-radius: 5px; color: var(--muted);
  font-size: 11.5px; font-weight: 700; flex: none; opacity: 0;
}
.sub-toggle.has-subs, .row:hover .sub-toggle { opacity: 1; }
.sub-toggle:hover { background: var(--hover); color: var(--text); }
.sub-toggle .icon { width: 15px; height: 15px; transition: transform .15s; }
.item-block.subs-open .sub-toggle .icon { transform: rotate(90deg); }
.item-name {
  flex: 1; min-width: 0; height: 28px; border: 1px solid transparent; border-radius: 5px; padding: 0 6px;
  background: transparent; outline: none; text-overflow: ellipsis;
}
.item-name:hover { border-color: var(--border-strong); background: var(--surface); }
.item-name:focus { border-color: var(--primary); background: var(--surface); }
.item-name-text { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.item-name-text.mobile-only-name { display: none; }
.open-btn {
  display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 6px; border-radius: 5px;
  color: var(--muted); flex: none; font-size: 12px; font-weight: 700; opacity: .0;
}
.open-btn.has-comments { opacity: 1; color: var(--primary); }
.row:hover .open-btn { opacity: 1; }
.open-btn:hover { background: var(--hover); }
.open-btn .icon { width: 17px; height: 17px; }

/* "+ Item toevoegen": één doorlopende cel over de hele tabelbreedte */
.add-row .name-cell, .sub-add .name-cell {
  grid-column: 1 / -2; border-right: 1px solid var(--border);
  border-left-color: color-mix(in srgb, var(--gc) 45%, transparent); border-bottom-left-radius: 6px;
}


.add-input { flex: 1; height: 28px; border: 1px solid transparent; border-radius: 5px; padding: 0 8px; background: transparent; outline: none; margin-left: 20px; }
.add-input:hover { border-color: var(--border); }
.add-input:focus { border-color: var(--primary); background: var(--surface); }
.add-input::placeholder { color: var(--muted); }


/* subitems */
.subitems { padding-left: 0; }
.sub-row .name-cell, .sub-add .name-cell { border-left-color: color-mix(in srgb, var(--gc) 45%, transparent); }
.sub-indent { width: 22px; flex: none; border-left: 1.5px solid var(--border-strong); height: 100%; margin-left: 12px; }
.sub-add .add-input { margin-left: 0; }
.cell.blank { background: color-mix(in srgb, var(--row) 70%, var(--bg)); }

/* cellen */
.clickable { cursor: pointer; }
.c-status {
  background: var(--sc, var(--status-empty)); color: var(--stc, #fff); font-weight: 500;
  border-right-color: var(--row); padding: 0 6px; transition: filter .1s;
}
.c-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-status.clickable:hover { filter: brightness(.94); }
.c-status.is-empty { color: transparent; }
.c-people.clickable:hover, .c-date.clickable:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.placeholder { color: var(--border-strong); display: grid; opacity: 0; }
.row:hover .placeholder, .field .placeholder { opacity: 1; }
.c-date { gap: 4px; }
.c-date .date-native { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; }
.c-date.overdue .date-text { color: var(--danger); font-weight: 600; }
.c-date.today .date-text { color: var(--primary); font-weight: 600; }
.c-date.done .date-text { text-decoration: line-through; color: var(--muted); }
.done-check { width: 15px; height: 15px; color: #00c875; stroke-width: 2.6; }
.cell-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); z-index: 1; display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%; color: var(--muted); background: var(--surface); opacity: 0;
}
.cell:hover .cell-clear { opacity: 1; }
.cell-clear .icon { width: 13px; height: 13px; }
.cell-input {
  width: 100%; height: 100%; border: 1px solid transparent; background: transparent; outline: none; padding: 0 8px;
  text-align: center; text-overflow: ellipsis;
}
.c-text .cell-input { text-align: left; }
.cell-input:hover { border-color: var(--border-strong); }
.cell-input:focus { border-color: var(--primary); background: var(--surface); text-align: left; }
.cell-text { padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* drag & drop */
.sortable-ghost { opacity: .3; }
.sortable-ghost .cell { background: var(--primary-soft) !important; }
.sortable-fallback { opacity: .95 !important; box-shadow: var(--shadow); border-radius: 6px; overflow: hidden; pointer-events: none; }
.sortable-fallback .subitems { display: none !important; }
.group.sortable-fallback { max-height: 120px; }
body.dragging * { cursor: grabbing !important; }

/* bulkbalk */
.bulk-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 18px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: rise .18s ease-out;
}
.bulk-count { margin-right: 10px; white-space: nowrap; }
.bulk-count b { color: var(--primary); }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ------------------------------------------------------------------ popover, menu's, modals */
.popover {
  position: fixed; z-index: 60; min-width: 0; max-width: 340px; max-height: min(480px, 72vh); overflow-y: auto; overflow-x: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px;
  animation: pop .12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu { display: grid; gap: 1px; min-width: 220px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px;
  text-align: left; color: var(--text); font-size: 14px;
}
.menu-item:hover { background: var(--hover); }
.menu-item .icon { color: var(--muted); width: 17px; height: 17px; }
.menu-item.danger, .menu-item.danger .icon { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-soft); }
.menu-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px 4px; }
.menu-form { padding: 4px; }
.pop-sep { height: 1px; background: var(--border); margin: 5px 2px; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 4px 10px 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; display: block; }
.swatch:hover { transform: scale(1.1); }
.swatch.current, .swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }

.pick-status { width: 184px; display: grid; gap: 5px; padding: 2px; }
.label-opt {
  height: 38px; border-radius: 2px; background: var(--sc); color: var(--stc, #fff); font-weight: 600; font-size: 13px;
  padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: transform .08s, filter .1s;
}
.label-opt:hover { filter: brightness(.94); }
.label-opt.current { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.label-clear, .label-edit {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border-radius: 6px;
  font-size: 12.5px; color: var(--muted);
}
.label-clear:hover, .label-edit:hover { background: var(--hover); color: var(--text); }
.label-clear .icon, .label-edit .icon { width: 14px; height: 14px; }
.label-edit { border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; margin-top: 2px; padding-top: 2px; }

.pick-people { width: 280px; }
.person-list { display: grid; gap: 1px; }
.person-opt { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.person-opt:hover { background: var(--hover); }
.person-opt input { position: absolute; opacity: 0; pointer-events: none; }
.person-opt > span:not(.avatar) { flex: 1; }
.person-opt .tick { color: var(--primary); opacity: 0; }
.person-opt:has(input:checked) { background: var(--primary-soft); }
.person-opt:has(input:checked) .tick { opacity: 1; }

.modal {
  border: 0; padding: 0; border-radius: 14px; background: var(--surface); color: var(--text);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(15, 18, 40, .45); }
.modal-body { padding: 22px 24px; display: grid; gap: 14px; }
.modal-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 4px; }

.label-rows { display: grid; gap: 8px; }
.label-row { display: flex; align-items: center; gap: 10px; }
.label-row .input { height: 34px; }
.color-pick { position: relative; }
.color-pick summary { list-style: none; }
.color-pick summary::-webkit-details-marker { display: none; }
.swatch.big { width: 30px; height: 30px; border-radius: 8px; }
.swatches.pop { position: absolute; z-index: 5; top: 36px; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 10px; width: 216px; }

.share-section { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.share-section h3 { font-size: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 12px; border-radius: 8px;
  border: 1.5px solid var(--border); cursor: pointer; height: 100%;
}
.seg-opt span .icon { grid-row: span 2; color: var(--muted); }
.seg-opt small { color: var(--muted); font-size: 12px; }
.seg-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.seg-opt input:checked + span .icon { color: var(--primary); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--primary); }
.member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.member-list li { display: flex; align-items: center; gap: 10px; }
.member-list li span:not(.avatar) { flex: 1; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form.wrap { flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 180px; }
.guest-link { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.guest-link.fresh { border-color: #00c875; }
.guest-link-main { display: grid; gap: 2px; min-width: 0; }
.link-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.guest-link-actions { display: flex; flex-wrap: wrap; gap: 4px; }

.move-list { display: grid; gap: 10px; max-height: 50vh; overflow-y: auto; }
.move-board-name { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 0; }
.move-board-name .icon { color: var(--muted); width: 16px; height: 16px; }
.move-opt { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 26px; border-radius: 6px; cursor: pointer; }
.move-opt:hover { background: var(--hover); }
.move-opt input { accent-color: var(--primary); }

.notif { width: 316px; max-width: 100%; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px; }
.notif-list { display: grid; gap: 1px; }
.notif-item { display: flex; gap: 10px; padding: 9px 8px; border-radius: 8px; color: var(--text); }
.notif-item:hover { background: var(--hover); }
.notif-item.unread { background: var(--primary-soft); }
.notif-text { display: grid; gap: 2px; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }

/* toasts */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 10px;
  background: #323338; color: #fff; box-shadow: var(--shadow); font-size: 14px; animation: rise2 .18s ease-out; max-width: calc(100vw - 32px);
}
.toast button { color: #8fc2ff; font-weight: 700; }
.toast.error { background: var(--danger); }
.toast.error button { color: #fff; }
@keyframes rise2 { from { opacity: 0; transform: translateY(10px); } }
.bulk-bar:not([hidden]) ~ #toasts { bottom: 90px; }

/* ------------------------------------------------------------------ detailpaneel */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(620px, 100vw);
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow);
  transform: translateX(105%); transition: transform .2s ease; display: flex; flex-direction: column;
  visibility: hidden;
}
.panel.open { transform: none; visibility: visible; }
.panel-scrim { display: none; }
.panel-inner { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.panel-head { padding: 14px 20px 8px; border-bottom: 1px solid var(--border); }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crumbs { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs span, .crumbs .link-btn { overflow: hidden; text-overflow: ellipsis; }
.crumbs .icon { width: 13px; height: 13px; }
.crumbs span[style] { font-weight: 600; }
.panel-actions { display: flex; gap: 2px; }
.panel-title {
  display: block; width: 100%; margin: 6px 0 4px -8px; padding: 4px 8px; font-size: 21px; font-weight: 700; line-height: 1.3;
  border: 1px solid transparent; border-radius: 6px; background: transparent; outline: none; resize: none; overflow: hidden;
}
.panel-title:hover { border-color: var(--border-strong); }
.panel-title:focus { border-color: var(--primary); }
.panel-title.static { margin-left: 0; padding-left: 0; }
.panel-scroll { flex: 1; overflow-y: auto; padding: 14px 20px 40px; overscroll-behavior: contain; }

.fields { display: grid; gap: 6px; }
.field { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; min-height: 36px; }
.field-name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field .cell { border: 1px solid var(--border); border-radius: 6px; min-height: 36px; justify-content: flex-start; padding: 0 10px; background: var(--surface); }
.field .c-status { justify-content: center; border-color: transparent; background: var(--sc, var(--status-empty)); max-width: 220px; border-radius: 0; }
.field .c-status.is-empty { color: var(--muted); }
.field .c-status.is-empty span::before { content: "Kies status"; color: #fff; }
.field .cell-input { text-align: left; padding: 0; border: 0; }
.field .cell-input:focus { background: transparent; }
.field .c-date { max-width: 220px; }
.field-select { height: 36px; max-width: 260px; }
.field-static { padding: 0 2px; }
.people-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 99px; background: var(--surface-2); font-size: 13px; }

.panel-section { margin-top: 22px; }
.panel-section h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.panel-section h3 .icon { color: var(--muted); width: 16px; height: 16px; }
.panel-subs { display: grid; gap: 4px; }
.panel-sub { display: flex; align-items: center; gap: 8px; padding: 0 0 0 10px; border: 1px solid var(--border); border-radius: 6px; min-height: 38px; overflow: hidden; }
.panel-sub-name { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 0; }
.panel-sub-name:hover { color: var(--primary); }
.panel-sub .c-status { width: 130px; min-height: 38px; border: 0; flex: none; }
.panel-sub-add { margin-top: 6px; }
.panel-sub-add .input { height: 36px; }

.tabs { display: flex; gap: 4px; margin: 26px 0 14px; border-bottom: 1px solid var(--border); position: sticky; top: -14px; background: var(--surface); z-index: 3; padding-top: 4px; }
.tab { padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface-2); font-size: 11px; color: var(--muted); }

.feed { display: grid; gap: 12px; }
.feed-empty { padding: 18px 0; text-align: center; }
.editor { border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); transition: border-color .12s, box-shadow .12s; position: relative; }
.editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.editor textarea { display: block; width: 100%; border: 0; outline: none; resize: none; background: transparent; padding: 12px 14px 6px; min-height: 76px; line-height: 1.5; }
.editor-bar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-top: 1px solid var(--border); }
.fmt { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 14px; }
.fmt:hover { background: var(--hover); color: var(--text); }
.fmt .icon { width: 17px; height: 17px; }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.attach-list:not(:empty) { padding-bottom: 8px; }

.comment { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.comment.editing { padding: 0; border: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-head .avatar { width: 28px; height: 28px; }
.comment-actions { margin-left: auto; display: flex; opacity: 0; }
.comment:hover .comment-actions { opacity: 1; }
.comment-body { overflow-wrap: anywhere; }
.comment-body p { min-height: 1em; }
.comment-body p.gap { height: .6em; }
.comment-body ul { margin: 4px 0; padding-left: 22px; }
.comment-body a { text-decoration: underline; }
.mention { color: var(--primary); background: var(--primary-soft); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.comment-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.comment-img img { display: block; max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; }
.file-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 13px; max-width: 100%; }
.file-pill .icon { width: 15px; height: 15px; color: var(--muted); }
.file-pill .muted { font-size: 11.5px; }

.dropzone label {
  display: flex; align-items: center; gap: 12px; padding: 16px; border: 1.5px dashed var(--border-strong); border-radius: 10px;
  cursor: pointer; color: var(--muted); transition: border-color .12s, background .12s;
}
.dropzone label span { display: grid; }
.dropzone label strong { color: var(--text); }
.dropzone label:hover, .dropzone.drag label { border-color: var(--primary); background: var(--primary-soft); }
.file-grid { display: grid; gap: 8px; }
.file-card { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.file-thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); flex: none; position: relative; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb .ext { position: absolute; bottom: 4px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; }
.file-meta { display: grid; min-width: 0; flex: 1; }
.file-name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; }

.activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.activity li { padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.act-who { font-weight: 600; }

/* mentions-autocomplete */
.mention-box { position: absolute; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; min-width: 220px; max-height: 220px; overflow-y: auto; }
.mention-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; text-align: left; }
.mention-opt small { color: var(--muted); }
.mention-opt.active, .mention-opt:hover { background: var(--hover); }

/* gastweergave */
.guest .content { margin: 0; border-radius: 0; border: 0; height: calc(100dvh - 52px); }
.guest-bar { display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface); }

/* ------------------------------------------------------------------ mobiel */
@media (max-width: 760px) {
  .only-mobile { display: inline-flex !important; }
  .hide-sm { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 70;
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 18, 40, .4); z-index: 65; }
  .topbar { padding: 0 8px; gap: 4px; }
  .content { margin: 0; border-radius: 0; border: 0; border-top: 1px solid var(--border); }
  .page { padding: 20px 16px 40px; }
  .page-head { flex-direction: column; }
  h1 { font-size: 21px; }

  .board-page { padding: 16px 0 100px; }
  .board-head, .toolbar { padding-left: 16px; padding-right: 16px; }
  .board-title { font-size: 20px; }
  .board-desc { margin-left: 7px; width: calc(100% - 32px); }
  .toolbar { gap: 6px; }
  .filters { order: 3; width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .pill-select { flex: 1; max-width: none; }

  /* bord wordt een lijst met kaartjes per groep */
  .board-scroll { overflow: visible; padding: 0 12px; }
  .groups { min-width: 0; gap: 26px; }
  .group-head { position: static; max-width: none; width: auto; }
  .group-handle { display: none; }
  .group-name { font-size: 16px; max-width: 60vw; }
  .head-row, .drag-handle, .select, .end-cell, .sub-toggle:not(.has-subs) { display: none !important; }
  .row, .add-row, .sub-add { display: flex; flex-wrap: wrap; min-height: 0; }
  .item-block {
    margin-bottom: 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
    border-left: 5px solid var(--gc); background: var(--row);
  }
  .item-row .cell, .sub-row .cell { border: 0; background: transparent !important; min-height: 0; }
  .item-row .cell:not(.name-cell):not(.is-main), .sub-row .cell:not(.name-cell):not(.is-main), .cell.blank { display: none; }
  .name-cell { flex: 1 1 100%; position: static; border-left: 0 !important; padding: 10px 8px 4px 10px; }
  .item-name { display: none; }
  .item-name-text.mobile-only-name, .item-name-text { display: block; font-weight: 600; font-size: 15px; white-space: normal; padding: 0 2px; }
  .open-btn { opacity: 1; }
  .sub-toggle { opacity: 1; order: 3; }
  .item-row .cell.is-main, .sub-row .cell.is-main { flex: none; min-height: 30px; margin: 4px 0 10px 10px; padding: 0 2px; }
  .item-row .c-status.is-main, .sub-row .c-status.is-main { background: var(--sc, var(--status-empty)) !important; border-radius: 99px; padding: 0 12px; min-width: 96px; font-size: 12.5px; font-weight: 600; }
  .item-row .c-status.is-main.is-empty { color: var(--muted); background: var(--surface-2) !important; }
  .item-row .c-status.is-main.is-empty span::before { content: "Status"; }
  .c-people.is-main .placeholder, .c-date.is-main .placeholder { opacity: .7; }
  .c-date.is-main { font-size: 13px; }
  .cell-clear { display: none; }
  .subitems { border-top: 1px solid var(--border); background: var(--surface-2); }
  .sub-row { border-bottom: 1px solid var(--border); }
  .sub-row .name-cell { padding-top: 8px; }
  .sub-indent { display: none; }
  .sub-row .item-name-text { font-size: 14px; font-weight: 500; }
  .sub-row .cell.is-main { margin-bottom: 8px; }
  .add-row { margin-top: 2px; }
  .add-row .cell, .sub-add .cell { border: 0 !important; background: transparent; }
  .add-row .name-cell, .sub-add .name-cell { padding: 0; }
  .add-input { margin-left: 0; height: 42px; border: 1px dashed var(--border-strong); border-radius: 10px; }
  .sub-add .add-input { border: 0; border-radius: 0; }

  .panel { width: 100vw; border-left: 0; }
  .panel-head { padding: 10px 14px 6px; }
  .panel-scroll { padding: 12px 14px 60px; }
  .field { grid-template-columns: 110px 1fr; }
  .panel-title { font-size: 19px; }

  .popover {
    left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; width: 100%;
    border-radius: 16px 16px 0 0; max-height: 75dvh; padding: 10px 10px calc(14px + env(safe-area-inset-bottom));
  }
  .pick-status, .pick-people, .notif { width: 100%; max-width: none; }
  .label-opt { height: 42px; }
  .menu-item { padding: 12px 10px; }
  .modal { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .seg { grid-template-columns: 1fr; }
  .field-select, .field .c-status, .field .c-date { max-width: none; }
  .bulk-bar { display: none !important; }
  .comment-actions { opacity: 1; }
}

@media (hover: none) {
  .drag-handle, .open-btn, .comment-actions, .placeholder, .cell-clear { opacity: 1; }
}


/* ================================================================== toevoegingen v2 */

/* weergave-wissel tabel / kalender */
.view-switch { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.view-switch input { position: absolute; opacity: 0; pointer-events: none; }
.view-switch span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.view-switch span .icon { width: 16px; height: 16px; }
.view-switch input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.view-switch input:focus-visible + span { outline: 2px solid var(--primary); }

/* swatches: "geen kleur" */
.swatch.none { background: var(--surface); border: 1.5px dashed var(--border-strong); }
.folder-colors { grid-template-columns: repeat(10, 1fr); padding: 6px 0 0; justify-items: start; }

/* rollen in het deelvenster */
.member-list .member-name { flex: 1; }
.role-select { width: auto; min-width: 130px; flex: none; }
.guest-link-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.menu-hint { padding: 2px 10px 6px; }

/* lange tekst & afbeeldingen in de tabel */
.c-longtext { color: var(--muted); }
.c-longtext .text-filled { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--primary); background: var(--primary-soft); }
.c-longtext:hover .text-filled { filter: brightness(.95); }
/* kolombreedte slepen */
.head-row .cell.head { position: relative; }
.col-resize { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 3; padding: 0 !important; }
.col-resize::after { content: ""; position: absolute; top: 20%; bottom: 20%; left: 3px; width: 2px; border-radius: 2px; background: var(--primary); opacity: 0; }
.col-resize:hover::after, body.resizing .col-resize.active::after { opacity: 1; }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none; }
.c-media { gap: 4px; }
.thumb { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--border); }
.thumb.file, .thumb.more { display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 700; }
.thumb.file .icon { width: 15px; height: 15px; }
.c-media.clickable:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }

/* pop-over voor afbeeldingen */
.pick-media { width: 280px; display: grid; gap: 8px; padding: 2px; }
.pick-media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pick-media-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.pick-media-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.pick-media-file { display: grid; place-items: center; height: 100%; padding: 6px; color: var(--muted); font-size: 11px; text-align: center; overflow: hidden; }
.dropzone.slim label { padding: 10px 12px; gap: 8px; font-size: 13px; }
.dropzone.slim label span { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.gallery-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20, 22, 40, .7); color: #fff; opacity: 0; transition: opacity .1s;
}
.gallery-remove .icon { width: 13px; height: 13px; }
.pick-media-item:hover .gallery-remove, .gallery-item:hover .gallery-remove { opacity: 1; }

/* de "post" in het paneel: beeld + tekst zoals het gepubliceerd wordt */
.post-card { margin-top: 18px; border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 16px; background: var(--surface); }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; min-height: 30px; }
.post-tools { display: flex; align-items: center; gap: 8px; }
.gallery { display: grid; gap: 4px; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.gallery-2 { grid-template-columns: 1fr 1fr; }
.gallery-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-3 .gallery-item:first-child { grid-row: span 2; }
.gallery-4 { grid-template-columns: 1fr 1fr; }
.gallery-item { position: relative; margin: 0; background: var(--surface-2); min-height: 120px; }
.gallery-1 .gallery-item { max-height: 420px; }
.gallery-item img { display: block; width: 100%; height: 100%; max-height: 420px; object-fit: cover; cursor: zoom-in; }
.gallery-1 .gallery-item img { object-fit: contain; background: var(--surface-2); }
.gallery-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; min-height: 120px; color: var(--muted); font-size: 12px; padding: 10px; text-align: center; }
.post-view { font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; border-radius: 8px; padding: 8px 10px; margin: 0 -10px; }
.post-view.clickable { cursor: text; }
.post-view.clickable:hover { background: var(--surface-2); }
.post-view ul { margin: 4px 0; padding-left: 22px; }
.post-view p.gap { height: .7em; }
.post-edit textarea { min-height: 160px; font-size: 14.5px; line-height: 1.6; }
.post-field.editing .post-view { display: none; }
.post-field.editing .post-edit { display: block; }
.hashtag { color: var(--primary); font-weight: 600; }
.char-warn { color: var(--danger); font-weight: 700; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(10, 12, 25, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: pop .12s ease-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow); }

/* ------------------------------------------------------------------ kalender */
.calendar { padding: 4px 28px 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 18px; min-width: 160px; text-align: center; text-transform: capitalize; }
.cal-col-pick { display: inline-flex; align-items: center; gap: 8px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--border); gap: 1px;
}
.cal-dow { background: var(--surface-2); padding: 8px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cal-day { background: var(--surface); min-height: 128px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day.weekend { background: color-mix(in srgb, var(--surface) 92%, var(--bg)); }
.cal-day.out { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.cal-day.out .cal-num { opacity: .45; }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.cal-num { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 4px; display: inline-flex; align-items: center; gap: 6px; }
.cal-wd { display: none; }
.cal-day.today .cal-num { color: #fff; background: var(--primary); border-radius: 99px; min-width: 24px; height: 24px; justify-content: center; }
.cal-add { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); opacity: 0; }
.cal-add .icon { width: 15px; height: 15px; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--hover); color: var(--text); }
.cal-items { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 20px; }
.cal-chip {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 6px; cursor: pointer; min-width: 0;
  background: color-mix(in srgb, var(--sc) 14%, var(--surface)); border-left: 4px solid var(--sc); font-size: 12.5px;
  transition: background .1s;
}
.cal-chip:hover { background: color-mix(in srgb, var(--sc) 24%, var(--surface)); }
.cal-chip.done .cal-chip-name { text-decoration: line-through; color: var(--muted); }
.cal-thumb { width: 34px; height: 34px; border-radius: 4px; object-fit: cover; flex: none; }
.cal-chip-body { display: grid; min-width: 0; gap: 1px; }
.cal-chip-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; min-width: 0; }
.cal-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip .avatar-stack .avatar { width: 18px; height: 18px; font-size: 8px; box-shadow: 0 0 0 1.5px var(--surface); }
.cal-chip .avatar-stack .avatar + .avatar { margin-left: -5px; }
.cal-undated { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.cal-undated summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; list-style: none; }
.cal-undated summary::-webkit-details-marker { display: none; }
.cal-undated .chev { transition: transform .15s; width: 16px; height: 16px; color: var(--muted); }
.cal-undated[open] .chev { transform: rotate(90deg); }
.cal-items.undated { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 10px; }
.cal-chip.sortable-ghost { opacity: .4; }

@media (max-width: 760px) {
  .view-switch span { padding: 0 10px; }
  .toolbar .search { flex: 1 1 100%; order: 5; }
  .toolbar .pill-select { flex: 1 1 40%; order: 6; }
  .toolbar > .btn.ghost { order: 4; }
  .calendar { padding: 0 12px; }
  .cal-title { min-width: 0; font-size: 16px; }
  /* agenda: alleen dagen met items (plus vandaag), onder elkaar */
  .cal-grid { display: block; border: 0; background: none; border-radius: 0; }
  .cal-dow { display: none; }
  .cal-day { min-height: 0; padding: 10px 0; border-bottom: 1px solid var(--border); background: none !important; }
  .cal-day.empty:not(.today), .cal-day.out { display: none; }
  .cal-wd { display: inline; text-transform: capitalize; }
  .cal-num { font-size: 14px; color: var(--text); }
  .cal-day.today .cal-num { padding: 0 10px; }
  .cal-add { opacity: 1; }
  .cal-chip { padding: 8px; font-size: 14px; }
  .cal-thumb { width: 44px; height: 44px; }
  .post-card { padding: 12px; }
  .pick-media { width: 100%; }
  .folder-colors { grid-template-columns: repeat(6, 1fr); }
}


/* ================================================================== toevoegingen v3 */

/* map met kleur: lichte tint over de map en de borden erin */
.side-folder[style] { background: color-mix(in srgb, var(--fc) 10%, transparent); border-radius: 8px; padding-bottom: 4px; margin: 2px 0; }
.side-folder[style] summary:hover, .side-folder[style] .side-board:hover { background: color-mix(in srgb, var(--fc) 16%, transparent); }
.side-folder[style] .side-board.active { background: color-mix(in srgb, var(--fc) 24%, var(--surface)); color: var(--text); }
.side-folder[style] .side-board.active .icon { color: var(--fc); }
.home-section.tinted { background: color-mix(in srgb, var(--fc) 8%, transparent); border-radius: 14px; padding: 2px 16px 16px; margin-top: 14px; }
.home-section.tinted .section-title { margin-top: 14px; }

/* mapvenster: meer lucht tussen naam, kleur en knoppen */
.modal-body > form { display: grid; gap: 18px; }
.modal-body .field-label .folder-colors { margin-top: 6px; gap: 10px; }
.modal-body .modal-actions { margin-top: 8px; }

/* scrollbalk alleen zichtbaar als je eroverheen gaat */
.board-scroll { scrollbar-width: thin; scrollbar-color: transparent transparent; padding-bottom: 6px; }
.board-scroll:hover { scrollbar-color: var(--border-strong) transparent; }
.board-scroll::-webkit-scrollbar { height: 8px; }
.board-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
.board-scroll:hover::-webkit-scrollbar-thumb { background: var(--border-strong); }

/* "+ Item toevoegen": tekst op dezelfde hoogte als de itemnamen, rand gelijk met de rijen */
.add-input { margin-left: 50px; }
.sub-add .add-input { margin-left: 30px; }
.add-row .name-cell, .sub-add .name-cell { border-left-color: var(--gc); opacity: 1; }
.add-row .name-cell { background: var(--row); }

/* kolommen slepen */
.col-head.sortable-chosen { background: var(--primary-soft) !important; color: var(--primary); }
.col-head.sortable-ghost { opacity: .4; }
.head-row .cell.head.sortable-fallback { box-shadow: var(--shadow); border-radius: 6px; }

/* tags */
.c-tags { justify-content: flex-start; gap: 4px; padding: 0 8px; overflow: hidden; flex-wrap: nowrap; }
.tag-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 99px; flex: none;
  background: var(--tc); color: var(--ttc, #fff); font-size: 12px; font-weight: 600; white-space: nowrap; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis;
}
.c-tags.clickable:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.field .c-tags { flex-wrap: wrap; padding: 6px 10px; }
.pick-tags { width: 320px; display: grid; gap: 4px; }
.tag-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 4px 6px 8px; max-height: 240px; overflow-y: auto; }
.tag-list > p { flex: 1 1 100%; }
.tag-opt { display: inline-flex; cursor: pointer; border-radius: 99px; }
.tag-opt[hidden] { display: none; }
.tag-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tag-opt .tag-pill { max-width: 200px; height: 26px; opacity: .35; transition: opacity .1s; }
.tag-opt:hover .tag-pill { opacity: .6; }
.tag-opt:has(input:checked) .tag-pill { opacity: 1; }
.tag-opt:has(input:focus-visible) .tag-pill { outline: 2px solid var(--primary); outline-offset: 2px; }

/* aangemaakt door */
.c-created { gap: 6px; justify-content: flex-start; padding: 0 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.c-created .created-meta { overflow: hidden; text-overflow: ellipsis; }
.field .c-created { color: var(--text); }

/* tekstveld met alleen een link */
.c-text.is-link .text-link {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%); max-width: calc(100% - 18px); z-index: 1;
  color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.c-text.is-link .cell-input { color: transparent; }
.c-text.is-link:focus-within .text-link { display: none; }
.c-text.is-link:focus-within .cell-input { color: var(--text); }
.field .c-text.is-link .text-link { left: 10px; }

/* lange tekst: alleen een icoon */
.c-longtext .text-filled .icon { width: 17px; height: 17px; }

/* eigen kleur in de labeleditor */
.custom-color { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; padding-top: 4px; }
/* kleurvelden van de browser: één ronde kleur, geen vierkant in een vierkant */
input[type=color] {
  -webkit-appearance: none; appearance: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: pointer; overflow: hidden; box-shadow: 0 0 0 1px var(--border-strong);
}
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.custom-color { position: relative; }
/* eigen kleur: gewoon een vlakje in de huidige kleur dat live meekleurt met de kiezer */
.custom-dot { position: relative; flex: none; background: var(--cc); border-radius: 6px; }
.custom-dot:hover { transform: none; filter: brightness(1.08); }
.custom-dot input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; box-shadow: none; }
.custom-color code { font-size: 11.5px; }
.color-field { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.avatar-color { position: relative; display: inline-flex; }
.avatar-color label { position: relative; display: inline-flex; cursor: pointer; }
.avatar-color input[type=color] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.avatar-color label:hover .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }

/* beheer: gebruik */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.stat { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; background: var(--surface); }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-note { margin-bottom: 20px; }

/* bekeken door */
.seen-by { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 6px 0 12px; font-size: 13px; }
.seen-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.seen-title .icon { width: 16px; height: 16px; }
.seen-person { display: inline-flex; align-items: center; gap: 6px; }

/* reacties op een update */
.replies { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--border); display: grid; gap: 8px; }
.comment.reply { border: 0; padding: 4px 0; background: none; }
.comment.reply .comment-head .avatar { width: 24px; height: 24px; font-size: 9.5px; }
.reply-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; justify-self: start; padding: 2px 4px; border-radius: 5px; }
.reply-btn:hover { color: var(--primary); background: var(--hover); }
.reply-btn .icon { width: 15px; height: 15px; }
.reply-form textarea { min-height: 54px; }

/* filters als knoppen */
.filter-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 10px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px; max-width: 220px;
}
.filter-btn:hover { background: var(--hover); }
.filter-btn.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.filter-btn .chev { width: 14px; height: 14px; color: var(--muted); }
.filter-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.filter-label .icon { width: 16px; height: 16px; color: var(--muted); }
.filter-label .avatar { width: 22px; height: 22px; font-size: 9px; }
.filter-dot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.filter-dot.empty { background: var(--status-empty); }
.pick-status .label-opt .filter-dot { display: none; }
.pick-status .label-opt .filter-label { justify-content: center; width: 100%; }
.filter-menu .menu-item.current { background: var(--primary-soft); }

/* kolom toevoegen: korte uitleg */
.menu-hint { display: flex; gap: 6px; line-height: 1.4; }
.menu-hint .icon { width: 14px; height: 14px; flex: none; margin-top: 2px; color: #00c875; }

@media (max-width: 760px) {
  .toolbar .filter-btn { flex: 1 1 40%; order: 6; max-width: none; justify-content: space-between; }
  .add-input { margin-left: 0; }
}

/* aantal bestanden bij een item */
.files-btn { display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 5px; border-radius: 5px; color: var(--muted); font-size: 12px; font-weight: 700; flex: none; }
.files-btn:hover { background: var(--hover); color: var(--text); }
.files-btn .icon { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- ronde 4 */
/* profielfoto's */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.avatar-upload label { position: relative; display: inline-flex; cursor: pointer; border-radius: 50%; }
.avatar-edit {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%;
  background: rgb(0 0 0 / .45); color: #fff; opacity: 0; transition: opacity .1s;
}
.avatar-edit .icon { width: 15px; height: 15px; }
.avatar-upload label:hover .avatar-edit { opacity: 1; }
.color-dot { display: inline-flex; margin-left: 4px; }
.color-dot label {
  position: relative; width: 16px; height: 16px; border-radius: 50%; background: var(--av); cursor: pointer;
  box-shadow: 0 0 0 1px var(--border-strong);
}
.color-dot input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.row-actions form + form { margin-left: 4px; }
.photo-card { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.stack-sm { display: grid; gap: 4px; }
.photo-actions { display: flex; gap: 6px; margin-top: 4px; }
.photo-actions label.btn { cursor: pointer; }

/* beheer: instellingen */
.settings-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; font-size: 14px; }
.settings-row > label { font-weight: 600; }
.input-unit { display: inline-flex; align-items: center; gap: 6px; }
.input-unit .input { width: 90px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); }
.plain-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-weight: 400; }
.plain-list li { display: flex; align-items: center; gap: 8px; }
.plain-list .icon { width: 16px; height: 16px; color: var(--muted); }

/* rolkeuze met icoontjes: oog, wolkje, potlood, kroon */
.role-seg { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); flex: none; height: 38px; }
.role-seg label { position: relative; display: inline-flex; cursor: pointer; }
.role-seg input { position: absolute; opacity: 0; pointer-events: none; }
.role-seg label > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; color: var(--muted); transition: background .1s, color .1s; }
.role-seg label:hover > span { background: var(--hover); color: var(--text); }
.role-seg input:checked + span { background: var(--primary); color: #fff; }
.role-seg label[data-role="owner"] input:checked + span { background: #f5a623; color: #fff; }
.role-seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.role-seg .icon { width: 17px; height: 17px; }
.role-seg-label { font-size: 12.5px; color: var(--muted); padding: 0 8px 0 6px; min-width: 88px; }
.role-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.role-badge .icon { width: 17px; height: 17px; }
.role-badge.owner .icon { color: #f5a623; }
.inline-icon { width: 14px; height: 14px; vertical-align: -2px; }
.member-list li { min-height: 40px; }
.member-list .icon-btn.xs { flex: none; }
.guest-link-title { flex-wrap: wrap; }
.guest-new { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.guest-new .input { flex: 1 1 200px; height: 38px; }
.guest-new .btn { height: 38px; }

/* zoeken in een lijst met mensen: 4 à 5 tegelijk zichtbaar, de rest scrollt */
.person-search { border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.person-search .search.mini { margin: 2px 2px 4px; }
.person-scroll { display: grid; gap: 1px; max-height: 196px; overflow-y: auto; align-content: start; }
.person-scroll > [hidden] { display: none; }
.person-search .person-opt { width: 100%; text-align: left; }
.person-search .add-icon { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }
.person-search .person-opt:hover .add-icon { color: var(--primary); }
.pick-people .person-list { max-height: 196px; overflow-y: auto; }
.filter-menu.people { width: 260px; }
.filter-menu.people .person-scroll { max-height: 200px; }
.filter-menu .menu-item[hidden] { display: none; }

/* kolommenu: hoofdkolom */
.menu-item.is-checked { color: var(--text); cursor: default; font-weight: 600; }
.menu-item.is-checked .icon { color: #00c875; }
.menu-item .icon.unchecked { opacity: 0; }

/* subitems in het detailpaneel */
.panel-sub > .cell { min-height: 38px; border: 0; border-left: 1px solid var(--border); flex: none; }
.panel-sub .c-people { width: 86px; overflow: hidden; padding: 0 6px; }
.panel-sub .c-people .avatar { width: 22px; height: 22px; font-size: 9px; }
.panel-sub .c-date { width: 92px; font-size: 13px; }

/* ---------------------------------------------------------------- artikel */
.c-article { gap: 6px; font-size: 12.5px; color: var(--muted); padding: 0 8px; white-space: nowrap; overflow: hidden; }
.c-article .icon { width: 16px; height: 16px; flex: none; }
.c-article:not(:has(.placeholder)) .icon { color: var(--primary); }
.c-article.clickable { cursor: pointer; }
.c-article.clickable:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.article-field { display: grid; gap: 8px; justify-items: start; }
.article-preview { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.article-field .post-head { width: 100%; }

.modal.full { width: min(1180px, calc(100vw - 32px)); height: calc(100dvh - 32px); max-height: none; }
.modal.full #modal-content { height: 100%; }
.article-modal { display: grid; grid-template-rows: auto auto 1fr; height: 100%; min-height: 0; }
.article-top { display: flex; align-items: center; gap: 14px; padding: 14px 18px 12px 24px; border-bottom: 1px solid var(--border); }
.article-title { flex: 1; min-width: 0; display: grid; }
.article-title h2 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-status { white-space: nowrap; }
.article-actions { display: flex; align-items: center; gap: 4px; }
.article-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 18px;
  border-bottom: 1px solid var(--border); background: var(--surface-2, var(--bg));
}
.article-toolbar button, .article-toolbar .tb-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 8px; border-radius: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; justify-content: center;
}
.article-toolbar button:hover, .article-toolbar .tb-btn:hover { background: var(--hover); }
.article-toolbar button.active { background: var(--primary-soft); color: var(--primary); }
.article-toolbar .icon { width: 17px; height: 17px; }
.tb-sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; }
.article-scroll { overflow-y: auto; min-height: 0; padding: 32px 24px 80px; display: grid; grid-template-columns: minmax(0, 720px) 240px; justify-content: center; gap: 40px; align-items: start; }
.article-scroll:not(:has(.article-images:not([hidden]))) { grid-template-columns: minmax(0, 720px); }
.article-body { outline: none; font-size: 16.5px; line-height: 1.75; min-height: 60vh; overflow-wrap: anywhere; }
.article-body:empty::before { content: attr(data-placeholder); color: var(--muted); }
.article-body > * { margin: 0 0 1em; }
.article-body h2 { font-size: 26px; line-height: 1.3; margin: 1.4em 0 .5em; }
.article-body h3 { font-size: 20px; line-height: 1.35; margin: 1.3em 0 .4em; }
.article-body h4 { font-size: 17px; margin: 1.2em 0 .4em; }
.article-body > :first-child { margin-top: 0; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li { margin: .25em 0; }
.article-body blockquote { border-left: 3px solid var(--primary); padding: 2px 0 2px 16px; color: var(--muted); font-style: italic; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body img { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 1em 0; }
.article-body[contenteditable] img { cursor: default; }
.article-images { position: sticky; top: 0; display: grid; gap: 8px; font-size: 13px; }
.article-images h3 { font-size: 13.5px; }
.article-images ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.article-images li { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; }
.article-images li img { grid-row: span 2; width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.article-images li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-images li .btn { justify-self: start; height: 24px; padding: 0 6px; font-size: 12px; }
@media (max-width: 900px) {
  .article-scroll, .article-scroll:not(:has(.article-images:not([hidden]))) { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 60px; }
  .article-images { position: static; }
}
@media (max-width: 760px) {
  .modal.full { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .article-top { padding: 10px 10px 10px 16px; }
  .article-toolbar { padding: 4px 8px; }
}

/* ---------------------------------------------------------------- mijn overzicht */
.me-page { max-width: 1240px; }
.me-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.me-grid .section-title { margin-top: 0; }
.task-bucket + .task-bucket { margin-top: 18px; }
.task-bucket h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.bucket-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--surface-2, var(--hover)); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 0;
}
.section-title .bucket-count { margin-left: 2px; }
.bucket-overdue h3 { color: var(--danger); }
.bucket-overdue .bucket-count { background: var(--danger-soft); color: var(--danger); }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.task-row {
  display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--text);
}
.task-row:hover { border-color: var(--border-strong); background: var(--hover); }
.task-status {
  flex: none; width: 96px; height: 30px; display: grid; place-items: center; border-radius: 0; padding: 0 6px;
  background: var(--sc); color: var(--stc); font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.task-main { flex: 1; min-width: 0; display: grid; }
.task-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-board { display: inline-flex; align-items: center; gap: 4px; }
.task-board .icon { width: 13px; height: 13px; }
.task-due { flex: none; font-size: 13px; color: var(--muted); }
.task-due.overdue { color: var(--danger); font-weight: 600; }
.task-due.today { color: var(--primary); font-weight: 600; }
.feed-card { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.feed-card + .feed-card { margin-top: 8px; }
.feed-card:hover { border-color: var(--border-strong); }
.feed-card-head { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.45; }
.feed-card-head > span:nth-child(2) { flex: 1; min-width: 0; }
.feed-time { flex: none; white-space: nowrap; }
.feed-card-body { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.feed-card-body a { pointer-events: none; }
.me-empty { padding: 12px 0; }
@media (max-width: 900px) { .me-grid { grid-template-columns: 1fr; } }

/* grote groepen: eerst 100 items */
.show-more {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 38px; padding: 0 0 0 44px;
  border: 1px solid var(--border); border-top: 0; border-left: 6px solid var(--gc); background: var(--surface);
  color: var(--primary); font-weight: 600; font-size: 13.5px; text-align: left;
}
.show-more:hover { background: var(--hover); }
.show-more .icon { width: 16px; height: 16px; }
.task-more { padding: 4px 8px; }

/* bord met externe gasten (actieve gastlink) */
.guest-mark { display: inline-flex; align-items: center; margin-left: 5px; color: #f5a623; flex: none; vertical-align: -2px; }
.guest-mark .icon { width: 13px; height: 13px; color: inherit !important; }
.side-board .guest-mark { margin-left: 2px; }
.guest-mark.big {
  gap: 5px; height: 28px; padding: 0 10px; border-radius: 14px; margin: 0 4px 0 0; font-size: 12.5px; font-weight: 600;
  background: color-mix(in srgb, #f5a623 14%, transparent); color: #b8740a;
}
.guest-mark.big:hover { background: color-mix(in srgb, #f5a623 24%, transparent); }
:root[data-theme="dark"] .guest-mark.big { color: #f5b74a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .guest-mark.big { color: #f5b74a; } }
