:root {
  --accent: #2f7d5b; --ink: #1d221f; --muted: #5d6660; --line: #dfe3de; --bg: #f3f5f2; --card: #fff; --soft: #fafbf9;
  --danger: #b3261e; --radius: 10px; --side: 232px;
  --green-bg: #e3f1ea; --green-ink: #1f6847; --red-bg: #f6e3e1; --red-ink: #8a2c24; --amber-bg: #fbf0d9; --amber-ink: #7a5410; --blue-bg: #e2ecf7; --blue-ink: #1f4f86;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); line-height: 1.5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7ece8; --muted: #9ba59e; --line: #2f3632; --bg: #151917; --card: #1c211e; --soft: #202622;
    --green-bg: #1d3a2c; --green-ink: #9fd8b9; --red-bg: #43211e; --red-ink: #f0aaa2; --amber-bg: #3f321a; --amber-ink: #f0cf8f; --blue-bg: #1c2d42; --blue-ink: #a9c8ee;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; margin-bottom: 12px; }
h3 { font-size: 1rem; margin-bottom: 8px; }
a { color: var(--accent); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.nowrap { white-space: nowrap; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
aside.side { background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 4px 8px 14px; }
.brand .logo { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .85rem; flex: none; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
aside nav { display: flex; flex-direction: column; gap: 2px; }
aside nav .sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 10px 4px; font-weight: 600; }
aside nav a { text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 8px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
aside nav a:hover { background: var(--bg); }
aside nav a.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
aside nav a .ico { width: 20px; text-align: center; }
aside nav a .badge { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 7px; font-weight: 700; }
aside .me { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 8px 0; font-size: .86rem; }
.mobilebar { display: none; }
.scrim { display: none; }
.show-sm { display: none; }
.link.danger { color: var(--danger); }
main { min-width: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 24px 64px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Kaarten, knoppen, formulieren ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card.tight { padding: 14px 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 18px; }
.cards .card { margin: 0; }
button, .btn {
  font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 14px; min-height: 38px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
button:hover, .btn:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.danger { color: var(--danger); }
.danger:hover { border-color: var(--danger); }
.link { border: 0; background: none; padding: 4px 6px; min-height: 0; color: var(--accent); }
.sm { padding: 4px 10px; min-height: 30px; font-size: .88rem; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
input, textarea, select { font: inherit; width: 100%; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 8px; background: var(--card); color: var(--ink); min-height: 40px; }
textarea { min-height: 120px; resize: vertical; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
input[type=color] { padding: 2px; width: 60px; height: 40px; }
.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.grid > button, .grid > .btn { justify-self: start; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.hint { font-size: .84rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
/* Vakje links, tekst (met eventuele toelichting) loopt er gewoon naast door in plaats van in losse kolommen */
.check { display: block; position: relative; padding-left: 28px; min-height: 22px; font-weight: 500; cursor: pointer; margin: 0; }
.check input { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; margin: 0; }
.check.strong { font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.section-off { opacity: .45; pointer-events: none; }
.error { color: var(--danger); font-size: .92rem; }

/* Kanaalkeuze in het publicatieformulier */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.channel { border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; background: var(--card); }
.channel input { margin-top: 4px; width: 18px; height: 18px; }
.channel b { display: block; }
.channel.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.channel.disabled { opacity: .5; cursor: not-allowed; }
.panel { border-left: 4px solid var(--accent); }
.panel h2 { display: flex; gap: 8px; align-items: center; }

/* ---------- Tabellen en labels ---------- */
table.matrix label.cell { display: flex; align-items: center; justify-content: flex-start; min-height: 40px; padding: 0 8px; margin: 0; cursor: pointer; font-weight: 400; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--soft); }
.table-wrap { overflow-x: auto; }
td.actions { text-align: right; white-space: nowrap; }
.pill { display: inline-block; font-size: .76rem; border-radius: 999px; padding: 2px 9px; font-weight: 600; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill.green { background: var(--green-bg); color: var(--green-ink); }
.pill.red { background: var(--red-bg); color: var(--red-ink); }
.pill.amber { background: var(--amber-bg); color: var(--amber-ink); }
.pill.blue { background: var(--blue-bg); color: var(--blue-ink); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.tabs button[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs input[type=search] { max-width: 260px; margin-left: auto; }

.stat { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }
.stat div b { display: block; font-size: 1.55rem; line-height: 1.2; }
.stat div span { font-size: .84rem; color: var(--muted); }
.tile-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tile-head h2 { margin: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
ul.plain li:last-child { border-bottom: 0; }
ul.plain li.log-line { flex-wrap: wrap; }
ul.plain li.log-line > :last-child { margin-left: auto; text-align: right; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: #2e9a63; }
.dot.bad { background: var(--danger); }
.dot.warn { background: #d49a1f; }

.img-prev { max-width: 280px; max-height: 170px; border-radius: 8px; display: block; margin-bottom: 8px; border: 1px solid var(--line); }
.toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.toolbar button { min-height: 32px; padding: 4px 10px; }
.preview { border: 1px dashed var(--line); border-radius: 8px; padding: 12px 16px; background: var(--soft); }
.preview h2, .preview h3 { margin: 12px 0 6px; }
.steps li { padding: 6px 0; }
.waprev { white-space: pre-wrap; background: #dcf8c6; color: #111; border-radius: 10px; padding: 10px 12px; font-size: .92rem; max-width: 420px; }
pre.code { background: #1f2420; color: #e8efe9; padding: 14px; border-radius: 8px; overflow-x: auto; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }

/* WhatsApp-ontvangers */
.targets { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.targets .check { padding-top: 5px; padding-bottom: 5px; }
.targets .check input { top: 8px; }

/* Chats */
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; min-height: 60vh; }
.chat-list { max-height: 72vh; overflow-y: auto; padding: 0; }
.chat-list button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 14px; white-space: normal; background: none; }
.chat-list button.active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.chat-list .last { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msgs { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; padding: 4px; margin-bottom: 10px; }
.msg { max-width: 78%; padding: 7px 11px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
.msg .meta { font-size: .74rem; color: var(--muted); }

/* Gedeelde inbox */
.chat-layout.inbox { grid-template-columns: 340px 1fr; align-items: start; }
.inbox .chat-list button { padding: 10px 14px 12px; }
.inbox .ib-from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.inbox .chat-list button > .row:first-child { flex-wrap: nowrap; }
.inbox .chat-list button > .row:first-child > :last-child { flex: none; }
.inbox .ib-subj { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox .ib-subj.unread { font-weight: 700; }
.ib-msg { padding: 14px 16px; }
.ib-msg.out { border-left: 4px solid var(--accent); }
.ib-body { margin-top: 8px; }
.ib-text { white-space: pre-wrap; word-wrap: break-word; }
.mail-frame { width: 100%; height: 380px; border: 1px solid var(--line); border-radius: 8px; background: #fff; resize: vertical; display: block; }
.ib-back { display: none; margin-bottom: 8px; }

/* Snelknoppen op het overzicht */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.quick a:hover { border-color: var(--accent); }
.quick a span { font-size: 1.3rem; }

/* Bezetting zalen */
.bez-day { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bez-date { font-weight: 600; font-size: .92rem; }
.bez-item { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 2px 0; }
.bez-item.clash b { color: var(--danger); }
@media (max-width: 640px) { .bez-day { grid-template-columns: 1fr; gap: 2px; } }

/* Handleidingen */
.manual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.manual-card { display: flex; gap: 14px; align-items: flex-start; color: inherit; text-decoration: none; margin: 0; transition: border-color .15s; }
.manual-grid .manual-card { margin: 0; }
.manual-card:hover { border-color: var(--accent); }
.manual-card .ico { font-size: 1.8rem; line-height: 1; }
.manual-card p { margin: 4px 0 0; }
.manual .pitch { font-size: 1.1rem; }
.manual h2 { margin-top: 22px; color: var(--accent); }
.manual ol { padding-left: 22px; }
.manual li { margin: 6px 0; }
.manual-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media print { aside.side, .mobilebar, .head .actions { display: none !important; } .layout { display: block; } .card { border: 0; } }

/* Rechten-editor */
.perm-group { margin-bottom: 12px; }
.perm-group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* Organogram-editor */
.org-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.org-people { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.org-person, .org-member { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin-bottom: 6px; cursor: grab; user-select: none; }
.org-person:active, .org-member:active { cursor: grabbing; }
.org-avatar { width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); font-weight: 700; font-size: .75rem; display: grid; place-items: center; flex: none; }
.org-branch { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--soft); padding: 8px; margin: 8px 0; }
.org-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: grab; padding: 2px 4px; border-radius: 6px; }
.org-head b { font-size: 1rem; }
.org-head .spacer { flex: 1; }
.org-head button { min-height: 28px; padding: 2px 8px; font-size: .85rem; }
.org-members { min-height: 38px; padding: 6px; border: 2px dashed transparent; border-radius: 8px; margin-top: 4px; }
.org-members .hint { margin: 0; }
.org-children { margin-left: 18px; }
.org-drop { border-color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 10%, transparent) !important; }
.org-root-drop { border: 2px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; color: var(--muted); font-size: .88rem; margin-top: 8px; }
.org-member .grow { flex: 1; min-width: 0; }
.org-member .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .org-layout { grid-template-columns: 1fr; } .org-people { position: static; max-height: 260px; } }

/* Concepten: teruggezet concept en "automatisch bewaard" */
.draft-note { background: var(--amber-bg); color: var(--amber-ink); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; }
.draft-note .link { color: inherit; text-decoration: underline; padding: 0 2px; min-height: 0; white-space: normal; }
.draft-status { font-size: .8rem; color: var(--muted); margin-top: 6px; min-height: 1em; }
.draft-status:empty { display: none; }

/* Dialoog en melding */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(640px, 94vw); max-height: 90vh; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(20,25,22,.45); }
#modal-body { padding: 22px; }
.login { max-width: 400px; width: calc(100% - 32px); margin: 12vh auto; padding: 20px 22px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; max-width: 90vw; }
#toast.show { opacity: 1; }
#toast.err { background: var(--danger); color: #fff; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  /* Dicht: buiten beeld én onzichtbaar (geen schaduwrand, niet bereikbaar met Tab); open: met een donkere laag erachter */
  aside.side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 30; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  aside.side.open { transform: none; visibility: visible; transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(20,25,22,.4); }
  .mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 16px; font-weight: 700; }
  .wrap { padding: 16px 16px 48px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .chat-layout, .chat-layout.inbox { grid-template-columns: 1fr; }
  .inbox.has-open .chat-list { display: none; }
  .ib-back { display: inline-block; }
  /* Chats en inbox op de telefoon: óf de lijst, óf het geopende gesprek (met terugknop), nooit beide onder elkaar */
  .chat-layout { min-height: 0; gap: 0; }
  .chat-layout.wa.has-open .chat-list { display: none; }
  .chat-layout.wa:not(.has-open) #chat-view, .chat-layout.inbox:not(.has-open) #ib-view { display: none; }
  .chat-list { max-height: none; }
  main:has(.chat-layout.has-open) .head, main:has(.chat-layout.has-open) .tabs { display: none; }
  /* Geopende WhatsApp-chat vult het scherm: berichten scrollen, antwoordvak blijft eronder in beeld */
  .chat-layout.wa.has-open #chat-view { padding: 12px 14px; margin: 0; }
  .chat-layout.wa.has-open #chat-view .tile-head { margin-bottom: 8px; }
  .chat-layout.wa.has-open .msgs { height: calc(100dvh - 380px); min-height: 200px; max-height: none; }
  .chat-layout.wa.has-open #reply { gap: 8px; }
  .inbox .ib-from { max-width: none; flex: 1 1 auto; min-width: 50%; }
  .chat-layout.wa.has-open #reply textarea { min-height: 70px; }
  .msg { max-width: 88%; }
  #ib-view .ib-msg { padding: 12px; }
  .tabs input[type=search] { max-width: none; margin-left: 0; }
  button, .btn { min-height: 44px; }
  .sm { min-height: 36px; }
  input, textarea, select { font-size: 16px; min-height: 44px; }
  .hide-sm { display: none; }
  /* Knoppen met lange tekst lopen niet meer buiten beeld */
  button, .btn { white-space: normal; max-width: 100%; text-align: left; }
  .tile-head { flex-wrap: wrap; gap: 8px; }
  code, .hint, .small { overflow-wrap: anywhere; }
  .tile-head > span, .tile-head > div { display: flex; flex-wrap: wrap; gap: 6px; }
}

/* ---------- Telefoon: tabellen worden kaartjes ---------- */
@media (max-width: 700px) {
  h1 { font-size: 1.3rem; }
  .card { padding: 16px; margin-bottom: 14px; }
  .head { margin-bottom: 14px; }
  .head h1 { flex: 1 1 auto; min-width: 0; }
  .login { margin-top: 6vh; }
  #modal-body { padding: 18px 16px; }
  dialog { width: calc(100vw - 16px); max-width: none; max-height: calc(100dvh - 16px); }
  .stat { gap: 14px 20px; }
  .stat div b { font-size: 1.35rem; }
  .table-wrap { overflow: visible; }
  table.stacked, table.stacked tbody, table.stacked thead { display: block; width: 100%; }
  table.stacked tr.head-row, table.stacked thead tr { display: none; }
  table.stacked tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stacked tr:last-child { border-bottom: 0; }
  table.stacked td { display: block; position: relative; padding: 3px 0 3px min(34%, 130px); min-height: 26px; border: 0; text-align: left; white-space: normal !important; overflow-wrap: anywhere; }
  table.stacked td::before { content: attr(data-label); position: absolute; left: 0; top: 6px; width: calc(min(34%, 130px) - 10px); font-size: .72rem; line-height: 1.3; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; color: var(--muted); overflow-wrap: normal; }
  table.stacked td[data-label=""] { padding-left: 0; min-height: 0; }
  table.stacked td[data-label=""]::before { display: none; }
  table.stacked td:empty { display: none; }
  table.stacked td > .link:first-child { padding-left: 0; }
  table.stacked td.hide-sm { display: none; }
  table.stacked td.actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; padding: 8px 0 0; }
  table.stacked td.actions::before { display: none; }
  table.stacked td > .pill, td .pill { white-space: normal; justify-self: start; }
  table.stacked td select, table.stacked td input:not([type=checkbox]):not([type=radio]) { min-width: 0 !important; width: 100%; }
  /* Selectievakje rechtsboven in het kaartje */
  table.stacked tr { position: relative; }
  table.stacked tr:has(> td > input[type=checkbox]:only-child) { padding-right: 32px; }
  table.stacked td:has(> input[type=checkbox]:only-child) { position: absolute; top: 10px; right: 0; padding: 0; min-height: 0; }
  table.stacked td:has(> input[type=checkbox]:only-child)::before { display: none; }
  tr.click:hover td { background: none; }
  .show-sm { display: block; }
  .opt-wide { flex: 1 1 100% !important; }
  .week-nav .week-label { flex: 1 1 100%; }
  /* Organogram: personen toevoegen via de keuzelijst per tak (slepen werkt niet op een telefoon) */
  .org-people { display: none; }
  .org-head button { min-height: 38px; min-width: 38px; }
  .opt-wide input { width: 100%; }
  .spacer-label { display: none; }
  /* Kleine links en knoppen groter aantikbaar */
  .head a.small, .tile-head a, aside .me a, aside .me .link, .ib-back { display: inline-block; padding: 10px 4px; }
  table.stacked td.actions .link, table.stacked td > .link { min-height: 40px; padding: 8px 10px; }
  table.stacked td.actions { gap: 4px 12px; }
  table.stacked td input[type=checkbox] { width: 24px; height: 24px; }
  /* Overzicht: snelknoppen compact in drie kolommen */
  .quick { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quick a { flex-direction: column; justify-content: center; text-align: center; gap: 4px; padding: 10px 6px; font-size: .8rem; line-height: 1.25; }
  /* Inbox: statusfilters als één rij die zijwaarts scrollt; notitieveld over de volle breedte */
  .tabs.ib-filters:not(:has(input)) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tabs.ib-filters:not(:has(input))::-webkit-scrollbar { display: none; }
  .tabs.ib-filters > button { flex: none; }
  #ib-note input { flex: 1 1 100%; }
  /* Lange dialogen: knoppen onderaan blijven in beeld */
  dialog form > .row:has(> button.primary) { position: sticky; bottom: -18px; background: var(--card); padding: 10px 0; margin-bottom: -10px; z-index: 2; }
  .table-wrap:has(> table.keep) { overflow-x: auto; }
  table.keep { min-width: max-content; }
  /* Keuzematrix (bv. "Vraag ook naar"): past op het scherm, grote aantikbare cellen */
  table.keep.matrix { min-width: 0; }
  table.matrix th { letter-spacing: 0; padding: 6px 4px; font-size: .7rem; }
  table.matrix td { padding: 0; vertical-align: middle; }
  table.matrix td:first-child { padding: 8px 4px 8px 0; }
  table.matrix input[type=radio] { width: 22px; height: 22px; }
}
