/* Tickory: stijl van de web-app. Eigen ontwerp, systeemlettertypen, geen externe bestanden.
   Opbouw: kleuren en maten (tokens) · indeling · zijbalk · knoppen en velden · kop en snel toevoegen · takenlijst · vensters
   · taakvenster · opmerkingen · telefoon · beweging. Het kleurenpalet voor projecten staat onderaan en wordt bewaakt door
   core/colors.test.js. */

:root {
  --bg: #ffffff;
  --bg-soft: #faf7f4;
  --bg-hover: #f3efeb;
  --bg-sunk: #f6f2ee;
  --text: #202020;
  --text-soft: #666666;
  --line: #eeeeee;
  --line-strong: #d3d3d3;
  --accent: #0f766e;
  --accent-soft: #e3f3f1;
  --accent-text: #ffffff;
  --accent-fill: var(--accent); /* gevulde knoppen; bij Tomaat in het donker een diepere tint met witte tekst, terwijl --accent (tekst en pictogrammen) helderder is */
  --accent-on-fill: var(--accent-text);
  --danger: #b42318;
  --warn: #b54708;
  --ok: #187434;
  --future: #5a4fcf;
  --p1: #d1453b;
  --p2: #cc6d00;
  --p3: #246fe0;
  --p4: #7d8791;
  --p1-text: #c43a30; /* dezelfde kleuren als tekst: donkerder voor genoeg contrast */
  --p2-text: #9a5200;
  --p3-text: #2268d8;
  --focus: #0b5ed7;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-pop: 0 18px 50px rgb(16 24 40 / 22%);
  --shadow-card: 0 1px 2px rgb(16 24 40 / 6%);
  --sidebar: 280px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #202020;
    --bg-soft: #282828;
    --bg-hover: #333333;
    --bg-sunk: #1a1a1a;
    --text: #f2f2f2;
    --text-soft: #b3b3b3;
    --line: #353535;
    --line-strong: #4d4d4d;
    --accent: #2dd4bf;
    --accent-soft: #14312e;
    --accent-text: #06201d;
    --accent-fill: var(--accent);
    --accent-on-fill: var(--accent-text);
    --danger: #f97066;
    --warn: #fdb022;
    --ok: #4ade80;
    --future: #a89bff;
    --p1: #f2776c;
    --p2: #f5a03a;
    --p3: #6aa3ff;
    --p4: #8b96a1;
    --p1-text: #f2776c;
    --p2-text: #f5a03a;
    --p3-text: #6aa3ff;
    --focus: #7db4ff;
    --shadow-pop: 0 18px 50px rgb(0 0 0 / 55%);
    --shadow-card: 0 1px 2px rgb(0 0 0 / 30%);
  }
}

/* Accentkleuren (Instellingen › Weergave, per apparaat; core/theme.js). De standaard (teal) staat hierboven in :root.
   Bewaakt door core/theme.test.js: genoeg contrast in licht en donker. */
/* accent-licht */
:root[data-accent="tomato"] { --accent: #c92e1d; --accent-soft: #fde7e4; --accent-text: #ffffff; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
:root[data-accent="blue"] { --accent: #1d5fd1; --accent-soft: #e7effc; --accent-text: #ffffff; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
:root[data-accent="indigo"] { --accent: #4f46e5; --accent-soft: #ecebfc; --accent-text: #ffffff; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
:root[data-accent="violet"] { --accent: #7c3aed; --accent-soft: #f1eafd; --accent-text: #ffffff; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
:root[data-accent="rose"] { --accent: #be185d; --accent-soft: #fbe8f0; --accent-text: #ffffff; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
:root[data-accent="orange"] { --accent: #b45309; --accent-soft: #fcefe3; --accent-text: #ffffff; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
:root[data-accent="green"] { --accent: #15803d; --accent-soft: #e6f4ea; --accent-text: #ffffff; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
:root[data-accent="graphite"] { --accent: #374151; --accent-soft: #eceef1; --accent-text: #ffffff; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
/* accent-donker */
@media (prefers-color-scheme: dark) {
  :root[data-accent="tomato"] { --accent: #f0786b; --accent-soft: #3d2220; --accent-text: #1a0604; --accent-fill: #d33322; --accent-on-fill: #ffffff; }
  :root[data-accent="blue"] { --accent: #7aa7ff; --accent-soft: #172a47; --accent-text: #06142e; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
  :root[data-accent="indigo"] { --accent: #a5b4fc; --accent-soft: #23244a; --accent-text: #11134a; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
  :root[data-accent="violet"] { --accent: #c4a7ff; --accent-soft: #2c2147; --accent-text: #250b4d; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
  :root[data-accent="rose"] { --accent: #f9a8c9; --accent-soft: #3d1a2a; --accent-text: #4a0a25; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
  :root[data-accent="orange"] { --accent: #fdba74; --accent-soft: #3a2615; --accent-text: #3b1d02; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
  :root[data-accent="green"] { --accent: #6ee7a0; --accent-soft: #15301f; --accent-text: #052e16; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
  :root[data-accent="graphite"] { --accent: #cbd5e1; --accent-soft: #272c33; --accent-text: #111827; --accent-fill: var(--accent); --accent-on-fill: var(--accent-text); }
}
/* einde-accent */

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
kbd { font: inherit; font-size: 0.8rem; padding: 1px 7px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--bg-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon .icon-fill, .icon-fill { fill: currentColor; stroke: none; }

/* ---------- gekleurde bolletjes (projecten, labels) ---------- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--p4)); flex: none; }
.dot-large { width: 14px; height: 14px; }

/* ---------- indeling ---------- */
.app { display: flex; min-height: 100%; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--bg-soft); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 10px 0; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; gap: 4px;
}
.main { flex: 1; min-width: 0; max-width: 920px; margin: 0 auto; padding: 0 32px 120px; }
.scrim { display: none; }
/* De balk bovenaan en de titel van het scherm (Inbox, Vandaag, …) staan samen vast bovenin; alleen de lijst eronder scrolt. */
.head-sticky { position: sticky; top: 0; z-index: 2; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 0 6px; background: var(--bg); min-height: 56px; }
.topbar-tools { flex: 1; min-width: 0; }
.icon-button.menu-button { display: none; }

/* ---------- zijbalk ---------- */
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.1rem; padding: 4px 8px 12px; color: var(--text); letter-spacing: -0.01em; }
.brand-mark { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-text); align-items: center; justify-content: center; }
.brand-mark .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.sidebar-add {
  display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; color: var(--accent); font-weight: 600;
  padding: 8px 10px; border-radius: 8px; min-height: 40px; text-align: left;
}
.sidebar-add:hover { background: var(--accent-soft); }
.sidebar-add-plus { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text); align-items: center; justify-content: center; }
.sidebar-add-plus .icon { width: 15px; height: 15px; stroke-width: 3; }
.sidebar-slot:empty { display: none; }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1 0 auto; }
.nav-row { display: flex; align-items: center; }
.nav-row[data-depth="1"] { padding-left: 14px; }
.nav-row[data-depth="2"] { padding-left: 28px; }
.nav-row[data-depth="3"] { padding-left: 42px; }
.nav-toggle {
  flex: none; width: 24px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
  color: var(--text-soft); border-radius: 6px; padding: 0;
}
button.nav-toggle:hover { background: var(--bg-hover); color: var(--text); }
.nav-toggle .icon { width: 14px; height: 14px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; text-align: left; border: 0; background: none;
  padding: 7px 10px; border-radius: 8px; min-height: 38px; color: var(--text);
}
.nav-item > .icon { color: var(--text-soft); width: 20px; height: 20px; }
.nav-item:hover { background: var(--bg-hover); }
.nav-item.active { background: var(--accent-soft); font-weight: 600; }
.nav-item.active > .icon { color: var(--accent); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { color: var(--text-soft); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.nav-shared { display: inline-flex; color: var(--text-soft); }
.nav-shared .icon { width: 14px; height: 14px; }
.nav-heading {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 4px 2px 10px; min-height: 40px;
  color: var(--text-soft); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.nav-heading .icon-button { width: 28px; height: 28px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--text-soft); text-align: left;
  padding: 8px 10px; border-radius: 8px; margin-top: 8px; min-height: 38px; font-size: 0.9rem;
}
.nav-link:hover { background: var(--bg-hover); color: var(--text); }
.nav-avatar {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 0.8rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-avatar .icon { width: 16px; height: 16px; }
.sidebar-footer { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); padding: 8px 0 10px; margin-top: 8px; position: sticky; bottom: 0; background: var(--bg-soft); }
.sidebar-footer .nav-item { flex: 1; min-width: 0; }
.nav-stack { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.sidebar-footer .nav-count { font-size: 0.75rem; }

/* ---------- knoppen en velden ---------- */
.icon-button {
  border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; font-size: 1.25rem; line-height: 1; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-soft); flex: none;
}
.icon-button:hover { background: var(--bg-hover); color: var(--text); }
.icon-button .icon { width: 19px; height: 19px; }
.button {
  border: 1px solid var(--line-strong); background: var(--bg); padding: 8px 14px; border-radius: 8px; min-height: 40px; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.button:hover { background: var(--bg-hover); }
.button-small { padding: 4px 10px; min-height: 34px; font-size: 0.9rem; }
.button-ghost { border-color: transparent; background: none; color: var(--text-soft); }
.button-ghost:hover { color: var(--text); }
.button .icon { width: 17px; height: 17px; }
.button-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-on-fill); font-weight: 600; }
.button-primary:hover { background: var(--accent); filter: brightness(1.08); }
.button-primary:disabled { opacity: 0.5; cursor: default; filter: none; }
.button-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.link-button { border: 0; background: none; color: var(--text-soft); padding: 12px 4px; text-decoration: underline; }
.field {
  width: 100%; border: 1px solid var(--line-strong); background: var(--bg); border-radius: 8px; padding: 8px 12px; min-height: 40px;
}
.field::placeholder { color: var(--text-soft); opacity: 0.85; }
textarea.field { resize: vertical; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.field:focus-visible { outline-offset: 0; border-color: var(--focus); }

/* ---------- status ---------- */
.sync-status {
  border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 5px 12px 5px 26px; font-size: 0.8rem;
  color: var(--text-soft); position: relative; white-space: nowrap; flex: none;
}
.sync-status[hidden] { display: none; }
.sync-status::before {
  content: ""; position: absolute; left: 10px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #17b26a;
}
.sync-status[data-state="syncing"]::before, .sync-status[data-state="pending"]::before { background: var(--p2); }
.sync-status[data-state="offline"]::before { background: var(--p4); }
.sync-status[data-state="unauthorized"]::before, .sync-status[data-state="error"]::before { background: var(--p1); }

/* ---------- kop van een overzicht ---------- */
.view-head { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; flex-wrap: wrap; }
.view-lead { display: inline-flex; align-items: center; color: var(--text-soft); }
.view-lead:empty { display: none; }
.view-lead .icon { width: 24px; height: 24px; }
#view-title { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.view-count { color: var(--text-soft); font-size: 0.95rem; align-self: flex-end; padding-bottom: 3px; }
.view-count:empty { display: none; }
.view-actions { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.view-actions:empty { display: none; }

/* ---------- snel toevoegen ---------- */
.quick-add {
  display: flex; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-card);
}
.quick-add:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.quick-input { flex: 1; min-width: 0; border: 0; background: none; padding-left: 0; min-height: 40px; }
.quick-input:focus-visible { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.preview { min-height: 0; padding: 8px 2px 0; }
.preview:empty { padding: 0; }
.preview-note { flex-basis: 100%; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; line-height: 1.3; color: var(--text-soft); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.preview .chip, .label-chips .chip, .quick-form .chip {
  padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 0.8rem;
}
.chip .icon { width: 13px; height: 13px; }
.chip-title { color: var(--text); font-weight: 600; }
.chip-due { color: var(--future); }
button.chip-due-edit { border: 0; background: none; font: inherit; cursor: pointer; }
button.chip-due-edit:hover { text-decoration: underline; }
.preview .chip-due { color: var(--accent); }
.chip-due.due-overdue { color: var(--danger); }
.chip-due.due-today { color: var(--ok); }
.chip-due.due-future { color: var(--future); }
.chip-deadline { color: var(--warn); }
.chip-deadline.due-overdue { color: var(--danger); }
.chip.prio-1 { color: var(--p1-text); }
.chip.prio-2 { color: var(--p2-text); }
.chip.prio-3 { color: var(--p3-text); }

/* ---------- takenlijst ---------- */
.content { padding-top: 10px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0 6px; }
.group { margin-top: 6px; }
.group + .group { margin-top: 18px; }
.group-head { display: flex; align-items: center; gap: 6px; padding: 8px 0 6px; border-bottom: 1px solid var(--line); min-height: 40px; }
.group-title { font-size: 0.98rem; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.group-count { color: var(--text-soft); font-size: 0.82rem; font-weight: 400; margin-right: auto; }
.group-title + :not(.group-count) { margin-left: auto; }
.group-toggle { flex: none; width: 28px; height: 28px; border: 0; background: none; color: var(--text-soft); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin-left: -6px; }
.group-toggle:hover { background: var(--bg-hover); color: var(--text); }
.group-toggle .icon { width: 16px; height: 16px; }
.group-more { width: 32px; height: 32px; }
.tasks { list-style: none; margin: 0; padding: 0; }
.task {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; column-gap: 2px;
  border-bottom: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 58px; cursor: pointer; background: var(--bg);
}
.task:hover { background: var(--bg-soft); }
.task[data-depth="1"] { margin-left: 28px; }
.task[data-depth="2"] { margin-left: 56px; }
.task[data-depth="3"] { margin-left: 84px; }
.task[data-depth="4"] { margin-left: 112px; }
.prio-1 { --prio: var(--p1); --prio-text: var(--p1-text); }
.prio-2 { --prio: var(--p2); --prio-text: var(--p2-text); }
.prio-3 { --prio: var(--p3); --prio-text: var(--p3-text); }
.prio-4 { --prio: var(--p4); --prio-text: var(--text-soft); }
.check {
  flex: none; width: 40px; height: 44px; border: 0; background: none; position: relative; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.check::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--prio, var(--p4)); box-sizing: border-box;
  background: color-mix(in srgb, var(--prio, var(--p4)) 10%, transparent); transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
/* het vinkje is getekend met randen (geen SVG per regel: dat scheelt bij lange lijsten) */
.check::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 9px; margin: -6.5px 0 0 -2.5px; border: solid var(--prio, var(--p4));
  border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; transition: opacity 0.12s;
}
.check:hover::after { opacity: 0.85; }
.check:hover::before { background: color-mix(in srgb, var(--prio, var(--p4)) 22%, transparent); }
.task-done > .check::before, .task-completing > .check::before, .check.task-done::before { background: var(--p4); border-color: var(--p4); }
.task-done > .check::after, .task-completing > .check::after, .check.task-done::after { opacity: 1; border-color: var(--bg); }
.task-completing > .check::before { animation: check-pop 0.28s ease-out; }
.task-completing { animation: task-fade 0.28s ease-in forwards; }
@keyframes check-pop { 0% { transform: scale(1); } 45% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes task-fade { 0%, 40% { opacity: 1; } 100% { opacity: 0.35; } }
.task-content { grid-column: 2; min-width: 0; padding: 10px 4px 10px 0; display: flex; flex-direction: column; gap: 3px; }
.task-body {
  min-width: 0; border: 0; background: none; text-align: left; padding: 0; display: flex; flex-direction: column; gap: 1px; border-radius: 6px; cursor: pointer;
}
.task-title { overflow-wrap: anywhere; line-height: 1.35; }
.task-title a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.task-title a:hover { text-decoration-color: currentColor; }
.task-done .task-title a { color: inherit; }
.task-desc {
  font-size: 0.85rem; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%;
}
.task-done .task-title { color: var(--text-soft); text-decoration: line-through; }
.task-done .task-desc { opacity: 0.7; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.task-meta .chip { padding: 0; background: none; border: 0; }
.task-meta .chip-toggle { border: 0; background: none; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 0.78rem; color: var(--text-soft); }
.task-meta .chip-toggle:hover { background: var(--bg-hover); color: var(--text); }
.task-meta .chip-toggle .icon:last-child { width: 12px; height: 12px; }
.chip-label { color: var(--text-soft); }
.chip-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--p4)); display: inline-block; flex: none; }
.chip-bell { font-size: 0.72rem; }
.chip-assignee { gap: 5px; }
.chip-assignee::before {
  content: attr(data-initials); display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg-hover); color: var(--text); font-size: 0.58rem; font-weight: 700; flex: none; letter-spacing: 0;
}
.chip-mine { color: var(--accent); font-weight: 600; }
.chip-mine::before { background: var(--accent); color: var(--accent-text); }
.task > .chip-project { grid-column: 3; align-self: start; margin: 11px 8px 0 0; color: var(--text-soft); gap: 6px; max-width: 200px; }
.task > .chip-project .dot { width: 8px; height: 8px; }
.chip-project-name { overflow: hidden; text-overflow: ellipsis; }
.task-actions {
  position: absolute; right: 0; top: 5px; display: flex; padding: 0 2px 0 24px; opacity: 0; transition: opacity 0.12s;
  background: linear-gradient(to right, transparent, var(--bg-soft) 24px);
}
.task-actions .icon-button { width: 32px; height: 32px; }
.task:hover .task-actions, .task:focus-within .task-actions { opacity: 1; }
.task-actions:focus-within { opacity: 1; }
.add-inline {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: var(--text-soft); padding: 9px 4px; min-height: 40px; text-align: left; border-radius: 8px;
}
.add-inline:hover { color: var(--accent); }
.add-inline .icon { width: 18px; height: 18px; color: var(--accent); }
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--bg-soft); margin-bottom: 10px;
}
.shared-with { padding-bottom: 6px; }

/* ---------- lege staat ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 44px 16px 36px; color: var(--text-soft); }
.empty-art { width: 128px; height: auto; margin-bottom: 10px; }
.empty-art .art-card { fill: var(--bg-soft); stroke: var(--line-strong); stroke-width: 1.5; }
.empty-art .art-done { fill: var(--accent); }
.empty-art .art-open { fill: none; stroke: var(--line-strong); stroke-width: 2; }
.empty-art .art-tick { fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.empty-art .art-line { fill: var(--line-strong); }
.empty-title { color: var(--text); font-size: 1.1rem; font-weight: 650; }
.empty-text { max-width: 36ch; }
.empty .button { margin-top: 10px; }

/* ---------- vensters ---------- */
.dialog {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--bg); color: var(--text);
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--shadow-pop);
}
.dialog-wide { width: min(600px, calc(100vw - 24px)); }
/* ---------- Instellingen (ui/settingsMenu.js), zoals Todoist: je account, groepen regels met een gekleurd pictogram ---------- */
.dialog-settings { width: min(460px, calc(100vw - 24px)); background: var(--bg-soft); }
.settings-menu { gap: 14px; }
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.settings-group { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.settings-row, .settings-account {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--text); text-align: left; min-height: 52px; padding: 8px 14px; font-size: 1rem;
}
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row:hover, .settings-row:active, .settings-account:hover { background: var(--bg-hover); }
.settings-account { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; min-height: 64px; }
.settings-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--tone, var(--text-soft)); color: #fff;
}
.settings-icon .icon { width: 19px; height: 19px; }
.settings-tone-blue { --tone: #3b82f6; } .settings-tone-green { --tone: #16a34a; } .settings-tone-orange { --tone: #f97316; }
.settings-tone-purple { --tone: #8b5cf6; } .settings-tone-pink { --tone: #ec4899; } .settings-tone-red { --tone: #ef4444; }
.settings-tone-teal { --tone: #0d9488; } .settings-tone-gray { --tone: #64748b; } .settings-tone-accent { --tone: var(--accent); } .settings-tone-danger { --tone: var(--danger); }
.settings-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.settings-chevron { flex: none; color: var(--text-soft); display: inline-flex; }
.settings-chevron .icon { width: 18px; height: 18px; }
.settings-row-danger { color: var(--danger); }
.settings-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.settings-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.settings-who strong { overflow-wrap: anywhere; }
.settings-mail { color: var(--text-soft); font-size: 0.85rem; overflow-wrap: anywhere; }
/* groepskoppen zoals bij Todoist (Personalisatie, Productiviteit, Meer) */
.settings-group-title { font-size: 0.8rem; font-weight: 700; color: var(--text-soft); margin: 4px 4px -6px; }
/* breed scherm: links de onderdelen, rechts het gekozen onderdeel (zoals Todoist op de computer) */
.dialog-settings-wide { width: min(980px, calc(100vw - 32px)); height: min(720px, calc(100dvh - 32px)); background: var(--bg); }
.settings-wide { display: grid; grid-template-columns: 270px minmax(0, 1fr); height: 100%; min-height: 0; }
.settings-nav { display: flex; flex-direction: column; gap: 12px; padding: 16px 12px; background: var(--bg-soft); border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.settings-nav > * { flex: none; } /* niet in elkaar schuiven: de kolom scrolt als het niet past */
.settings-nav-title { font-size: 1.15rem; padding: 4px 6px 0; }
.settings-nav .settings-group { border: 0; background: none; gap: 2px; }
.settings-nav .settings-row { min-height: 38px; padding: 5px 8px; border-radius: 8px; font-size: 0.95rem; }
.settings-nav .settings-row + .settings-row { border-top: 0; }
.settings-nav .settings-row.is-current { background: var(--accent-soft); font-weight: 600; }
.settings-nav .settings-icon { width: 24px; height: 24px; border-radius: 7px; }
.settings-nav .settings-icon .icon { width: 15px; height: 15px; }
.settings-nav .settings-chevron { display: none; }
.settings-nav .settings-account { min-height: 52px; padding: 6px 8px; }
.settings-nav .settings-avatar { width: 32px; height: 32px; font-size: 0.95rem; }
.settings-main { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.settings-close { position: absolute; top: 10px; right: 10px; z-index: 1; }
.settings-pane { flex: 1; overflow-y: auto; min-height: 0; outline: none; }
.settings-pane .dialog-form { padding: 20px 56px 24px 28px; }
.settings-pane .dialog-form > h2 { font-size: 1.3rem; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .dialog-settings { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .dialog-settings .dialog-form { padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); }
}
/* de snelle datumkiezer: onderaan als een blad op een telefoon, anders gewoon in het midden */
.quick-date-list { display: flex; flex-direction: column; gap: 2px; }
.quick-date-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 10px 8px; border-radius: 8px; min-height: 44px; }
.quick-date-row:hover, .quick-date-row:active { background: var(--bg-hover); }
.quick-date-day { color: var(--text-soft); font-size: 0.85rem; }
@media (max-width: 760px) {
  .dialog-sheet { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 14px 14px 0 0; border-bottom: 0; }
}
.dialog::backdrop { background: rgb(8 12 16 / 50%); }
.dialog-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.dialog-form h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.dialog-buttons { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.button-left { margin-right: auto; }
.field-label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-soft); min-width: 0; }
.field-label .field { font-size: 1rem; color: var(--text); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.subtask-row { display: flex; gap: 8px; }
.hint { font-size: 0.85rem; color: var(--text-soft); min-height: 1.2em; }
.hint-bad, .error { color: var(--danger); }
.error { font-size: 0.9rem; min-height: 0; }
.error:empty, .hint:empty { display: none; }
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu-item { border: 0; background: var(--bg-soft); text-align: left; padding: 12px 14px; border-radius: 8px; min-height: 44px; }
.menu-item:hover { background: var(--bg-hover); }
.menu-danger { color: var(--danger); }
.dialog-quick { width: min(620px, calc(100vw - 24px)); }
.quick-big { font-size: 1.1rem; min-height: 46px; }
.quick-row { display: flex; align-items: center; gap: 8px; }
.quick-row .field { flex: 1; min-width: 0; }
.voice-button { flex: none; width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 50%; }
.voice-button .icon { width: 22px; height: 22px; }
.voice-button.listening { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); animation: voice-pulse 1.4s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .voice-button.listening { animation: none; } }
.quick-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-choices .chip-button { min-height: 36px; padding: 4px 12px; }
.quick-choices .chip-button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.quick-reminder-own { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.quick-reminder-own li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* de kleine kalender (ui/datePopup.js) */
.datepop-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.datepop-quick .chip-button { min-height: 36px; padding: 4px 12px; }
.datepop-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.datepop-month { text-transform: capitalize; }
.datepop-weekdays, .datepop-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.datepop-weekdays span { text-align: center; color: var(--text-soft); font-size: 0.78rem; padding: 2px 0; text-transform: uppercase; }
.datepop-day {
  border: 0; background: none; border-radius: 50%; aspect-ratio: 1; min-height: 40px; margin: 1px auto; width: 100%; max-width: 44px; font-size: 0.95rem; color: var(--text);
}
.datepop-day:hover { background: var(--bg-hover); }
.datepop-day.is-other { color: var(--text-soft); opacity: 0.55; }
.datepop-day.is-today { box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.datepop-day.is-selected { background: var(--accent); color: var(--accent-text); opacity: 1; }
.datepop-time-row { display: flex; align-items: center; gap: 8px; }
.datepop-time-row .field { flex: 1; }
.quick-options { display: flex; gap: 12px; }
.quick-options .field-label { flex: 1; }

/* kleur kiezen */
.color-field { border: 0; margin: 0; padding: 0; }
.color-field legend { font-size: 0.85rem; color: var(--text-soft); padding: 0; margin-bottom: 6px; }
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.swatch { position: relative; display: flex; align-items: center; justify-content: center; height: 40px; cursor: pointer; border-radius: 10px; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--dot); display: inline-flex; align-items: center; justify-content: center; color: transparent; box-shadow: 0 0 0 2px transparent; transition: box-shadow 0.12s; }
.swatch-dot .icon { width: 14px; height: 14px; stroke-width: 3.4; }
.swatch:hover .swatch-dot { box-shadow: 0 0 0 2px var(--line-strong); }
.swatch input:checked + .swatch-dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--dot); color: var(--bg); }
.swatch input:focus-visible + .swatch-dot { outline: 2px solid var(--focus); outline-offset: 3px; }

/* sneltoetsen en archief */
.shortcuts { margin: 0; display: flex; flex-direction: column; }
.shortcut { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.shortcut:last-child { border-bottom: 0; }
.shortcut dt, .shortcut dd { margin: 0; }
.shortcut dd { color: var(--text-soft); text-align: right; }
.keys { display: inline-flex; align-items: center; gap: 6px; }
.keys-then { font-size: 0.8rem; color: var(--text-soft); }
.archive-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.archive-item { display: flex; align-items: center; gap: 8px; }
.archive-item[data-depth="1"] { padding-left: 18px; }
.archive-item[data-depth="2"] { padding-left: 36px; }
.archive-item[data-depth="3"] { padding-left: 54px; }
.archive-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 8px 8px; border-radius: 8px; min-height: 44px; }
.archive-open:hover { background: var(--bg-hover); }
.archive-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- taakvenster ---------- */
.dialog-task { width: min(980px, calc(100vw - 32px)); height: min(760px, calc(100dvh - 32px)); }
.dialog-task[open] { display: flex; }
.task-form { display: flex; flex-direction: column; min-height: 0; width: 100%; padding: 0; }
.task-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 22px; border-bottom: 1px solid var(--line); }
.task-crumb { display: flex; align-items: center; gap: 9px; min-width: 0; }
.task-crumb h2 { font-size: 0.9rem; font-weight: 600; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-columns {
  flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "main side" "extra side";
  grid-template-rows: auto 1fr; column-gap: 0;
}
.task-col-main { grid-area: main; padding: 18px 22px 8px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.task-col-extra { grid-area: extra; padding: 8px 22px 22px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.task-col-side { grid-area: side; padding: 14px 18px 22px; background: var(--bg-soft); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.task-title-row { display: flex; align-items: flex-start; gap: 4px; margin-left: -8px; }
.check-large { height: 44px; margin-top: 1px; }
textarea.task-title-input {
  font-size: 1.35rem; font-weight: 650; line-height: 1.3; border-color: transparent; background: none; padding: 6px 8px; resize: none; overflow: hidden; min-height: 44px; letter-spacing: -0.01em;
}
.task-title-input:hover, .task-title-input:focus { border-color: var(--line-strong); }
textarea.task-title-input:focus-visible, textarea.task-description:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.task-description { border-color: transparent; background: none; padding: 6px 8px; font-size: 0.95rem; min-height: 72px; }
.task-description:hover, .task-description:focus { border-color: var(--line-strong); }
.prop { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prop-label { font-size: 0.78rem; font-weight: 600; color: var(--text-soft); }
.task-col-side .field { background: var(--bg); }
.quick-dates { display: flex; flex-wrap: wrap; gap: 5px; margin-top: -6px; }
/* "Onthoud mij" op het inlogscherm */
.login-remember { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; font-size: 0.92rem; cursor: pointer; }
/* uitnodigen met een link in het deelvenster (ui/inviteLinks.js) */
.invite-section { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.invite-section .subheading { margin-top: 0; }
.invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.invite-row .field { width: auto; flex: 0 1 auto; }
.invite-url { flex: 1 1 auto; min-width: 0; font-family: var(--mono, ui-monospace, monospace); font-size: 0.8rem; }
.invite-made { margin: 8px 0; }
/* de herhalingskiezer onder de snelle datums (ui/repeatPicker.js) */
.repeat-panel[hidden], .repeat-panel [hidden] { display: none !important; }
.repeat-panel { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.repeat-presets { display: flex; flex-wrap: wrap; gap: 5px; }
.repeat-custom { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.repeat-heading { margin: 0; font-size: 0.85rem; color: var(--text-soft); font-weight: 600; }
.repeat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.repeat-row .field, .repeat-option .field { width: auto; min-width: 0; }
.repeat-interval, .repeat-small { width: 4.5em !important; }
.repeat-weekdays { display: flex; gap: 3px; }
.repeat-day { flex: 1 1 0; min-width: 0; padding: 0; min-height: 32px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.repeat-day:hover { background: var(--bg-hover); }
.repeat-day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.repeat-months { display: flex; flex-direction: column; gap: 6px; }
.repeat-option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.repeat-actions { display: flex; justify-content: flex-end; }
.repeat-panel .hint { margin: 0; }
.chip-button {
  border: 1px solid var(--line-strong); background: var(--bg); border-radius: 999px; font-size: 0.78rem; padding: 3px 10px; min-height: 28px; color: var(--text);
}
.chip-button:hover { background: var(--bg-hover); }
.chip-button:has(.icon) { display: inline-flex; align-items: center; gap: 4px; }
.chip-button[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.prio-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.prio-option { position: relative; display: block; cursor: pointer; }
.prio-option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.prio-option span {
  display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg);
  font-weight: 600; font-size: 0.88rem; color: var(--prio-text);
}
.prio-option .icon { width: 14px; height: 14px; stroke-width: 3; display: none; }
.prio-option:hover span { background: var(--bg-hover); }
.prio-option input:checked + span { background: color-mix(in srgb, var(--prio) 14%, var(--bg)); border-color: var(--prio); box-shadow: inset 0 0 0 1px var(--prio); }
.prio-option input:checked + span .icon { display: block; }
.prio-option input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.label-field { display: flex; flex-direction: column; }
.label-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 4px 6px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); }
.label-chips:focus-within { border-color: var(--focus); }
.label-input { flex: 1 1 90px; min-width: 70px; border: 0; background: none; padding: 4px 4px; min-height: 28px; }
.label-input:focus-visible { outline: none; }
.chip-removable { gap: 5px; padding-right: 3px; }
.chip-x { border: 0; background: none; width: 20px; height: 20px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--text-soft); }
.chip-x:hover { background: var(--bg-hover); color: var(--text); }
.chip-x .icon { width: 11px; height: 11px; }
.task-created { font-size: 0.8rem; color: var(--text-soft); margin-top: 4px; }
.subtasks { display: flex; flex-direction: column; gap: 8px; }
.subheading { font-size: 0.95rem; margin: 4px 0 0; }
.subtask-list { list-style: none; margin: 0; padding: 0; }
.subtask { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.subtask .check { height: 40px; }
.subtask-title { flex: 1; min-width: 0; border: 1px solid transparent; background: none; padding: 6px 8px; border-radius: 6px; min-height: 36px; }
.subtask-title:hover, .subtask-title:focus { border-color: var(--line-strong); }
.subtask.task-done .subtask-title { color: var(--text-soft); text-decoration: line-through; }
.subtask.task-done .check::before { background: var(--p4); border-color: var(--p4); }
.subtask.task-done .check::after { opacity: 1; border-color: var(--bg); }
.save-tip { font-size: 0.8rem; color: var(--text-soft); }
.task-form > .error { padding: 6px 22px 0; }
.task-form > .dialog-buttons { padding: 12px 22px 14px; margin: 0; border-top: 1px solid var(--line); }
.task-col-side .section-plain { gap: 6px; }
.task-col-side .subheading { margin: 6px 0 0; font-size: 0.78rem; font-weight: 600; color: var(--text-soft); }

/* ---------- opmerkingen ---------- */
.comments { display: flex; flex-direction: column; gap: 10px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.75rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 28px; }
.comment-author { font-size: 0.9rem; }
.comment-time, .comment-edited { font-size: 0.78rem; color: var(--text-soft); }
.comment-tools { margin-left: auto; display: flex; opacity: 0; transition: opacity 0.12s; }
.comment:hover .comment-tools, .comment:focus-within .comment-tools { opacity: 1; }
.comment-tools .icon-button { width: 30px; height: 30px; }
.comment-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.comment-text a { color: var(--focus); text-decoration: underline; text-underline-offset: 2px; }
.comment-none { color: var(--text-soft); font-size: 0.9rem; list-style: none; }
.comment-edit { display: flex; flex-direction: column; gap: 8px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.comment-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.comment-tip { margin-right: auto; font-size: 0.78rem; color: var(--text-soft); }
.dialog-comments .comment-list { max-height: 50dvh; overflow-y: auto; }

/* ---------- meldingen ---------- */
.toasts {
  position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column;
  align-items: center; gap: 8px; pointer-events: none; z-index: 20; padding: 0 12px;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #23272c; color: #fff; padding: 10px 10px 10px 16px;
  border-radius: 10px; max-width: 560px; box-shadow: 0 8px 24px rgb(0 0 0 / 30%);
}
.toast-error { background: #7a271a; }
.toast-text { flex: 1; }
.toast-action { border: 0; background: none; color: #5eead4; font-weight: 700; padding: 6px 8px; min-height: 36px; }
.toast-close { border: 0; background: none; color: #c9d1d9; font-size: 1.2rem; width: 36px; height: 36px; }
.fatal { padding: 24px; color: var(--danger); }

/* ---- delen, account en beheer ---- */
.section { border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.section > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.section[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.section-form { display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }
.device-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.device:last-child { border-bottom: 0; }
.device-buttons { display: flex; gap: 6px; flex-shrink: 0; }
.device-info { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--line); }
.badge-bad { color: var(--danger); }
/* tweestapsverificatie en back-up (ui/accountDialogs.js); de QR-code is altijd zwart op wit, ook in donker, anders leest een camera hem slecht */
.qr-box { display: flex; justify-content: center; padding: 8px 0; }
.qr { width: min(240px, 70vw); height: auto; background: #fff; border-radius: 6px; }
.two-factor-secret code, .recovery-codes { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.recovery-codes { resize: none; line-height: 1.5; }
.login-code { font-size: 1.2rem; letter-spacing: 0.15em; }
/* een koppelcode voor de browserextensie (ui/accountDialogs.js): groot, in een vaste breedte, op een smal scherm netjes afgebroken */
.pairing { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.pairing h3 { margin: 0 0 4px; font-size: 0.95rem; }
.pair-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.15rem; font-weight: 600; letter-spacing: 0.08em; overflow-wrap: anywhere; user-select: all; }
/* inloggen via SSO: de knop over de hele breedte, en een scheiding met "of met je gebruikersnaam" (ui/accountDialogs.js) */
.sso-row { justify-content: stretch; }
.sso-row .sso-button { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 0.85rem; color: var(--text-soft); }
.login-or::before, .login-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.warning { padding: 8px 10px; border-left: 3px solid var(--danger); background: var(--bg-soft); }
.check-row { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.error:not(:empty) { color: var(--danger); }

/* ---- herinneringen ---- */
.section-plain { display: flex; flex-direction: column; gap: 8px; }
.reminder-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reminder-add .field { flex: 1 1 150px; min-width: 0; }
.places-coords { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dialog-buttons-start { justify-content: flex-start; }

/* ---------- weergaven: keuze, bord en kalender (ui/viewSwitch.js, ui/board.js, ui/calendar.js) ---------- */
.btn-options.active { color: var(--text); background: var(--accent-soft); }
.options-grid { display: grid; gap: 14px; }
.view-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; margin-right: 6px; background: var(--bg); }
.view-switch-button { border: 0; border-radius: 0; background: none; color: var(--text-soft); min-height: 34px; padding: 4px 11px; }
.view-switch-button + .view-switch-button { border-left: 1px solid var(--line); }
.view-switch-button:hover { background: var(--bg-hover); color: var(--text); }
.view-switch-button.active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.view-switch-button:focus-visible { outline-offset: -2px; }
.main:has(.board) { max-width: none; }
.main:has(.cal) { max-width: 1240px; }

/* bord */
.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding: 4px 2px 18px; scroll-snap-type: x proximity; scroll-padding: 0 12px; }
.board-column {
  flex: 0 0 292px; min-width: 0; display: flex; flex-direction: column; padding: 4px 8px 8px; scroll-snap-align: start;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.board-column-head { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 0 0 4px; }
.board-column-title { font-size: 0.95rem; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.board-column-head .group-count { margin-right: auto; }
.board-cards { list-style: none; margin: 0; padding: 2px 0 4px; display: flex; flex-direction: column; gap: 8px; min-height: 14px; }
.task.task-card {
  grid-template-columns: 40px minmax(0, 1fr) 36px; content-visibility: visible; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); box-shadow: var(--shadow-card);
}
.task.task-card:hover { background: var(--bg); border-color: var(--line-strong); }
.task-card .task-actions { display: none; }
.task-card .card-move { grid-column: 3; width: 32px; height: 32px; margin: 7px 2px 0 0; opacity: 0; }
.task-card:hover .card-move, .task-card:focus-within .card-move, .task-card .card-move:focus-visible { opacity: 1; }
@media (hover: none) { .task-card .card-move { opacity: 1; } }
.board-column .add-inline { padding-left: 6px; }
.board-column-new { flex-basis: 220px; background: none; border-style: dashed; }

/* kalender */
.cal { display: flex; flex-direction: column; gap: 14px; }
.cal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-title { flex: 1; min-width: 10ch; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.cal-mode { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; background: var(--bg); }
.cal-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-table th { padding: 6px 6px; font-size: 0.78rem; font-weight: 600; color: var(--text-soft); text-align: left; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.cal-table abbr { text-decoration: none; }
.cal-weekhead, .cal-weeknum { width: 40px; text-align: center !important; }
.cal-table th.cal-weeknum { font-size: 0.72rem; font-weight: 400; vertical-align: top; padding-top: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-table tr:last-child > th.cal-weeknum, .cal-table tr:last-child > .cal-day { border-bottom: 0; }
.cal-day { vertical-align: top; height: 118px; min-width: 0; padding: 4px 4px 6px; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day:last-child { border-right: 0; }
.cal[data-mode="week"] .cal-day { height: 340px; }
.cal-weekend { background: var(--bg-soft); }
.cal-out { background: var(--bg-sunk); }
.cal-out .cal-daynum { color: var(--text-soft); }
.cal-day:focus-visible { outline-offset: -2px; }
.cal-day-head { display: flex; align-items: center; gap: 4px; min-height: 28px; }
.cal-dayname { display: none; }
.cal-daynum { margin-right: auto; padding: 1px 7px; font-size: 0.85rem; font-variant-numeric: tabular-nums; border-radius: 999px; }
.cal-today .cal-daynum { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.cal-add {
  flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--accent); opacity: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.cal-add .icon { width: 17px; height: 17px; }
.cal-add:hover { background: var(--accent-soft); }
.cal-day:hover .cal-add, .cal-day:focus-within .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.cal-item {
  display: flex; align-items: center; min-width: 0; border-radius: 6px; border-left: 3px solid var(--prio, var(--p4));
  background: color-mix(in srgb, var(--prio, var(--p4)) 11%, var(--bg));
}
.cal-check { flex: none; position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; border-radius: 50%; }
.cal-check::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; box-sizing: border-box;
  border: 2px solid var(--prio, var(--p4)); transition: background 0.12s;
}
.cal-check:hover::before { background: color-mix(in srgb, var(--prio, var(--p4)) 35%, transparent); }
.cal-repeat { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-soft); }
.cal-repeat .icon { width: 13px; height: 13px; }
.cal-open {
  flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 5px; padding: 3px 5px 3px 0; border: 0; border-radius: 5px; background: none;
  text-align: left; font-size: 0.82rem; line-height: 1.25; color: var(--text);
}
.cal-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-time, .cal-when { flex: none; font-size: 0.74rem; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.cal-late .cal-when { color: var(--danger); }
.cal-virtual { background: none; border-left-style: dashed; }
.cal-deadline { background: none; border-left-style: dotted; }
.cal-done { background: none; opacity: 0.75; }
.cal-done .cal-title-text { text-decoration: line-through; color: var(--text-soft); }
.cal-done .cal-check { background: var(--text-soft); border-color: var(--text-soft); }
.cal-deadline .cal-deadline-mark { color: var(--danger, #c0392b); }
.cal-virtual .cal-title-text { color: var(--text-soft); }
.cal-project { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--text-soft); font-size: 0.74rem; }
.cal-project .dot { width: 8px; height: 8px; }
.cal-project-name { display: none; }
.cal-overdue .cal-project-name { display: inline; }
.cal-overdue .group-head { border-bottom: 0; padding-bottom: 2px; }
.cal-overdue-list .cal-open { font-size: 0.9rem; padding: 5px 6px 5px 0; }
.cal-more { display: none; margin-top: 2px; padding: 2px 6px; border: 0; border-radius: 5px; background: none; color: var(--text-soft); font-size: 0.78rem; text-align: left; }
.cal-more:hover { background: var(--bg-hover); color: var(--text); }
.cal[data-mode="month"] .cal-day .cal-items > .cal-item:nth-child(n+5) { display: none; }
.cal[data-mode="month"] .cal-more { display: block; }
.cal-keys { padding-top: 2px; }

@media (max-width: 760px) {
  .board { margin: 0 -14px; padding: 4px 14px 18px; scroll-snap-type: x mandatory; scroll-padding: 0 14px; }
  .board-column { flex-basis: 84vw; scroll-snap-stop: always; }
  .board-column-new { flex-basis: 62vw; }
  .task.task-card { grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "check content move"; }
  .task-card .card-move { grid-area: move; width: 44px; height: 44px; margin: 2px 0 0; opacity: 1; }
  .view-actions .view-switch { flex: 1 0 100%; margin: 0 0 4px; }
  .view-actions .view-switch .view-switch-button { flex: 1; justify-content: center; }
  .view-actions .view-switch .btn-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
  .view-switch-button { min-height: 44px; min-width: 44px; }
  .cal-bar { gap: 6px; }
  .cal-title { order: -1; flex-basis: 100%; }
  .cal-table, .cal-table tbody, .cal-table tr, .cal-table td, .cal-table th.cal-weeknum { display: block; }
  .cal-table thead { display: none; }
  .cal-table { border: 0; border-radius: 0; }
  .cal-table th.cal-weeknum { width: auto; padding: 14px 2px 2px; border: 0; background: none; text-align: left !important; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
  .cal-day, .cal[data-mode="week"] .cal-day { height: auto; padding: 0 0 6px; border: 0; border-bottom: 1px solid var(--line); background: none; }
  .cal-table tr:last-child > .cal-day:last-child { border-bottom: 1px solid var(--line); }
  .cal-today { background: var(--accent-soft); border-radius: var(--radius-sm); }
  .cal[data-mode="month"] .cal-out { display: none; }
  .cal[data-mode="month"] .cal-past.cal-empty { display: none; }
  .cal[data-mode="month"] .cal-table tr:not(:has(.cal-day:not(.cal-out):not(.cal-past))) { display: none; }
  .cal-day-head { min-height: 44px; padding-left: 4px; }
  .cal-dayname { display: inline; font-weight: 600; text-transform: capitalize; }
  .cal-daynum { margin-right: auto; padding-left: 0; }
  .cal-today .cal-daynum { padding: 1px 7px; }
  .cal-add { width: 44px; height: 44px; opacity: 1; }
  .cal-add .icon { width: 20px; height: 20px; }
  .cal-items { padding: 0 4px; gap: 4px; }
  .cal-check, .cal-repeat { width: 44px; height: 44px; }
  .cal-check::before { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
  .cal-open { min-height: 44px; align-items: center; font-size: 1rem; padding: 6px 6px 6px 0; }
  .cal[data-mode="month"] .cal-day .cal-items > .cal-item:nth-child(n+5) { display: flex; }
  .cal[data-mode="month"] .cal-more { display: none; }
  .cal-project-name { display: inline; }
  .cal-keys { display: none; }
}

/* slepen (ui/dragdrop.js): een kolom of dag als doel, en een bord dat tijdens het slepen niet vastklikt */
.board-column.dnd-target { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.cal-day.dnd-target { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.dnd-active .board { scroll-snap-type: none; }
.dnd-active .cal-add { opacity: 0; }
@media (pointer: coarse) { .cal-item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }

@media (forced-colors: active) {
  .board-column.dnd-target, .cal-day.dnd-target { outline-color: Highlight; }
  .cal-today .cal-daynum { outline: 2px solid Highlight; }
  .view-switch-button.active { outline: 2px solid Highlight; outline-offset: -2px; }
  .cal-check::before { border-color: CanvasText; }
}

/* ---------- breed scherm: tussenmaat ---------- */
@media (max-width: 1100px) {
  .main { padding: 0 24px 120px; }
}

/* ---------- telefoon ---------- */
@media (max-width: 760px) {
  .icon-button.menu-button { display: inline-flex; width: 44px; height: 44px; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 11; transform: translateX(-102%); transition: transform 0.18s ease, visibility 0s linear 0.18s;
    width: min(86vw, 320px); padding-top: calc(12px + env(safe-area-inset-top)); visibility: hidden;
  }
  .nav-open .sidebar { transform: none; box-shadow: 8px 0 30px rgb(0 0 0 / 25%); visibility: visible; transition: transform 0.18s ease, visibility 0s; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / 40%); z-index: 10; }
  .nav-item, .nav-link, .sidebar-add { min-height: 46px; }
  .nav-toggle { height: 46px; width: 32px; }
  .main { padding: 0 14px 120px; }
  .topbar { padding-top: calc(8px + env(safe-area-inset-top)); }
  #view-title { font-size: 1.4rem; }
  .view-actions { margin-left: 0; width: 100%; }
  .view-actions .btn-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .view-actions .button { min-width: 44px; min-height: 44px; padding: 0 10px; }
  .view-actions .btn-comments .btn-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
  .quick-add .button { padding: 8px 14px; min-height: 44px; }
  .quick-input { min-height: 44px; }
  .field { min-height: 44px; font-size: 1rem; }
  .button { min-height: 44px; }
  .button-small { min-height: 44px; }
  .icon-button { width: 44px; height: 44px; }
  .field-grid { grid-template-columns: 1fr; }
  .task { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "check content" ". project"; }
  .check { width: 44px; height: 48px; grid-area: check; }
  .task-content { grid-area: content; padding-right: 2px; }
  .task-meta { gap: 3px 12px; }
  .chip { font-size: 0.8rem; }
  .task > .chip-project { grid-area: project; margin: -4px 0 9px; max-width: 100%; }
  .task-actions { display: none; }
  .task[data-depth="1"] { margin-left: 22px; }
  .task[data-depth="2"] { margin-left: 44px; }
  .task[data-depth="3"], .task[data-depth="4"] { margin-left: 66px; }
  .add-inline { min-height: 48px; }
  .group-toggle { width: 44px; height: 44px; margin-left: -10px; }
  .group-more { width: 44px; height: 44px; }
  .dialog-form { padding: 16px; }
  .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .swatch { height: 48px; }
  /* het taakvenster vult het hele scherm; de eigenschappen staan onder de titel, subtaken en opmerkingen daaronder */
  .dialog-task { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .task-columns { display: flex; flex-direction: column; overflow-y: auto; }
  .task-col-main { padding: 14px 14px 6px; }
  .task-col-side { border-left: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px; }
  .task-col-extra { padding: 14px 14px 20px; }
  .task-top { padding-left: 16px; padding-top: calc(6px + env(safe-area-inset-top)); }
  .task-form > .dialog-buttons { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
  .task-form > .error { padding: 6px 14px 0; }
  .save-tip { display: none; }
  .subtask-title { min-height: 44px; }
  .comment-tools { opacity: 1; }
  .chip-button { min-height: 44px; padding: 4px 14px; }
  .prio-option span { min-height: 44px; }
}

@media (hover: none) {
  .task-actions { display: none; }
  .comment-tools { opacity: 1; }
}

/* ---------- beweging en voorkeuren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .check::before { border-color: CanvasText; }
  .nav-item.active { outline: 2px solid Highlight; }
}

/* ---------- kleurenpalet voor projecten en labels (zie core/colors.js; core/colors.test.js bewaakt dat dit klopt) ---------- */
/* palet-licht */
.pc-charcoal { --dot: #4a5460; }
.pc-red { --dot: #d03a31; }
.pc-orange { --dot: #d4690a; }
.pc-amber { --dot: #a97a00; }
.pc-olive { --dot: #7a8a1a; }
.pc-green { --dot: #2b9a45; }
.pc-mint { --dot: #16977f; }
.pc-teal { --dot: #0f8a8c; }
.pc-sky { --dot: #1a8cc4; }
.pc-blue { --dot: #3a6fd8; }
.pc-indigo { --dot: #5b57d9; }
.pc-violet { --dot: #8a4fd8; }
.pc-magenta { --dot: #c43aa8; }
.pc-rose { --dot: #d4426e; }
.pc-brown { --dot: #8c5a3a; }
.pc-grey { --dot: #7a8591; }
@media (prefers-color-scheme: dark) {
/* palet-donker */
.pc-charcoal { --dot: #a9b3be; }
.pc-red { --dot: #f0786f; }
.pc-orange { --dot: #f29a45; }
.pc-amber { --dot: #e0b030; }
.pc-olive { --dot: #b4c64a; }
.pc-green { --dot: #5fcf7a; }
.pc-mint { --dot: #4fd1b4; }
.pc-teal { --dot: #3fc9cc; }
.pc-sky { --dot: #58b8ee; }
.pc-blue { --dot: #7aa2f7; }
.pc-indigo { --dot: #9a97f5; }
.pc-violet { --dot: #b88af2; }
.pc-magenta { --dot: #ea6fd0; }
.pc-rose { --dot: #f27a9f; }
.pc-brown { --dot: #c89a78; }
.pc-grey { --dot: #98a3af; }
}
/* einde-palet */

/* Weergave (Instellingen › Weergave): keuzerondjes voor thema en accentkleur */
.choice-group { border: 0; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choice-group legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice-option { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.choice-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.choice-option input { accent-color: var(--accent); margin: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.accent-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 15%); }
.accent-dot-teal { background: #0f766e; }
.accent-dot-blue { background: #1d5fd1; }
.accent-dot-indigo { background: #4f46e5; }
.accent-dot-violet { background: #7c3aed; }
.accent-dot-rose { background: #be185d; }
.accent-dot-orange { background: #b45309; }
.accent-dot-green { background: #15803d; }
.accent-dot-graphite { background: #374151; }
@media (prefers-color-scheme: dark) {
  .accent-dot-teal { background: #2dd4bf; }
  .accent-dot-blue { background: #7aa7ff; }
  .accent-dot-indigo { background: #a5b4fc; }
  .accent-dot-violet { background: #c4a7ff; }
  .accent-dot-rose { background: #f9a8c9; }
  .accent-dot-orange { background: #fdba74; }
  .accent-dot-green { background: #6ee7a0; }
  .accent-dot-graphite { background: #cbd5e1; }
}

/* de beschrijving van een taak met opmaak (Markdown); een klik maakt er weer tekst van */
.task-desc-view { padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; cursor: text; min-height: 2.5em; overflow-wrap: anywhere; }
.task-desc-view[role="button"]:hover { border-color: var(--line); }
.task-desc-view:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.task-desc-view .md > :first-child { margin-top: 0; }
.task-desc-view .md > :last-child { margin-bottom: 0; }
.task-title .md-link { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.task-title .md-code { font-size: 0.9em; }

/* kalender: kleur op project of label in plaats van prioriteit (ui/calendar.js) */
.cal-item.cal-colored { --prio: var(--dot); }
.cal-color { width: auto; }

/* de beschrijving van een project, onder de titel */
.project-desc { margin: 0 0 14px; padding: 2px 0 2px 12px; border-left: 3px solid var(--line); color: var(--text-soft); max-width: 72ch; }
.project-desc .md > :first-child { margin-top: 0; }
.project-desc .md > :last-child { margin-bottom: 0; }

/* een knop in de kop van een groep (Opnieuw plannen bij Te laat) */
.group-action { margin-left: auto; font-size: 0.85rem; }

/* de samenvatting boven Vandaag: een smalle balk met hoeveel van je dagdoel al gedaan is */
.stats-strip-today { margin-bottom: 8px; }
.stats-strip-bar { position: relative; flex: 1 1 50px; max-width: 90px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.stats-strip-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); border-radius: inherit; }
.stats-strip-fill.is-met { background: var(--success, #2e9d5b); }
.stats-strip-link { margin-left: auto; font-size: 0.78rem; padding: 2px 4px; }

/* Voltooid: een afvinking van een terugkerende taak (de taak zelf staat nog open) */
.task-recurring-done {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; column-gap: 2px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.task-recurring-done .check-static { cursor: default; }
.task-recurring-done .task-title { color: var(--text-soft); }
.chip-repeat .icon { width: 12px; height: 12px; }

/* bijlagen bij een opmerking */
.comment-files { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.comment-file-open { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.comment-file-open img { width: 48px; height: 48px; object-fit: cover; border-radius: 5px; }
.comment-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-file-pending { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 0.85rem; color: var(--text-soft); }
.comment-file-pending.is-failed .hint { color: var(--danger); }
.comment-files-chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.comment-files-chosen:empty { display: none; }
.comment-file-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--accent-soft); font-size: 0.85rem; }
.comment-file-remove { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 6px; color: var(--text-soft); }
.comment-attach { margin-right: auto; }

/* suggesties onder het veld van snel toevoegen */
.quick-suggest-wrap { position: relative; }
.quick-suggest {
  position: absolute; z-index: 5; left: 0; right: 0; top: 2px; margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow-y: auto;
  background: var(--bg-elevated, var(--bg)); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
}
.quick-suggest-item { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: 7px; cursor: pointer; }
.quick-suggest-item.active, .quick-suggest-item:hover { background: var(--accent-soft); }
.quick-suggest-item .icon { width: 15px; height: 15px; color: var(--text-soft); }
.quick-suggest-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-suggest-hint { color: var(--text-soft); font-size: 0.85rem; }
@media (pointer: coarse) { .quick-suggest-item { min-height: 44px; } }

/* onderdelen van de zijbalk die je hebt verborgen (Instellingen › Algemeen); app.js zet body[data-hide-nav] */
body[data-hide-nav~="upcoming"] [data-fk="nav-upcoming"],
body[data-hide-nav~="completed"] [data-fk="nav-completed"],
body[data-hide-nav~="notifications"] [data-fk="nav-notifications"],
body[data-hide-nav~="notes"] [data-fk="nav-notes"], body[data-hide-nav~="notes"] .nav-sub-notes { display: none; }

/* Instellingen › Algemeen: de drie keuzes voor de balk onderaan naast elkaar (op een smal scherm onder elkaar) */
.general-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .general-tabs { grid-template-columns: 1fr; } }

/* een spraakbericht onder een opmerking: de speler met de naam eronder */
.comment-voice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.comment-voice audio { width: min(320px, 100%); height: 36px; }

/* de emoji-kiezer (ui/emojiPicker.js): een paneel boven het invoerveld */
.comment-compose { position: relative; }
.emoji-picker {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 30; width: min(336px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgb(0 0 0 / 18%);
}
.emoji-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.emoji-tab { flex: none; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; font-size: 1.1rem; cursor: pointer; }
.emoji-tab.active, .emoji-tab:hover { background: var(--bg-soft); }
.emoji-tab.active { box-shadow: inset 0 -2px 0 var(--accent); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; max-height: 216px; overflow-y: auto; }
.emoji-item { aspect-ratio: 1; min-width: 0; border: 0; border-radius: 8px; background: none; font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 0; }
.emoji-item:hover, .emoji-item:focus-visible { background: var(--bg-soft); }
.emoji-none { grid-column: 1 / -1; margin: 8px 4px; }

/* ---------- de tijdlijn (ui/timeline.js): uren, taken op hun tijd, Hele dag, In te plannen ---------- */
.tl { --tl-hour: 48px; --tl-gutter: 52px; display: flex; flex-direction: column; gap: 8px; }
.tl-main { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
.tl-board { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); min-width: 0; }
.tl-headrow, .tl-alldayrow { display: grid; grid-template-columns: var(--tl-gutter) repeat(var(--tl-days, 7), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.tl-board[data-days="1"] { --tl-days: 1; }
.tl-board[data-days="7"] { --tl-days: 7; }
.tl-dayhead { padding: 6px 8px; display: flex; flex-direction: column; font-size: 0.8rem; color: var(--text-soft); border-left: 1px solid var(--line); }
.tl-dayhead.tl-today .tl-daynum { color: var(--accent); font-weight: 700; }
.tl-dayname { text-transform: capitalize; }
.tl-daynum { font-size: 1rem; color: var(--text); }
.tl-allday-label { font-size: 0.72rem; color: var(--text-soft); padding: 6px 4px; text-align: right; }
.tl-allday-cell { list-style: none; margin: 0; padding: 3px; min-height: 30px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.tl-allday-cell.tl-drop-over { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tl-scroll { max-height: min(70vh, 900px); overflow-y: auto; overscroll-behavior: contain; }
.tl-grid { position: relative; display: grid; grid-template-columns: var(--tl-gutter) repeat(var(--tl-days, 7), minmax(0, 1fr)); height: calc(var(--tl-hour) * 24); }
.tl-board[data-days="1"] .tl-grid { --tl-days: 1; }
.tl-hours { display: grid; grid-template-rows: repeat(24, var(--tl-hour)); }
.tl-hour { font-size: 0.7rem; color: var(--text-soft); text-align: right; padding-right: 6px; transform: translateY(-0.6em); }
.tl-col {
  position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--tl-hour));
}
.tl-col.tl-today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.tl-item { box-sizing: border-box; }
.tl-col .tl-item {
  position: absolute; padding: 1px 2px; min-height: 22px; overflow: hidden; cursor: default;
}
.tl-item .tl-open {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; height: 100%; text-align: left; overflow: hidden;
  border: 0; border-left: 3px solid var(--prio, var(--p4)); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 0.78rem; line-height: 1.25;
  background: color-mix(in srgb, var(--prio, var(--p4)) 14%, var(--bg)); color: var(--text); cursor: pointer;
}
.tl-item.tl-colored .tl-open { border-left-color: var(--dot); background: color-mix(in srgb, var(--dot) 16%, var(--bg)); }
.tl-item.tl-short .tl-open { flex-direction: row; gap: 6px; align-items: flex-start; padding-top: 2px; padding-bottom: 0; }
.tl-item.tl-short .tl-title { white-space: nowrap; }
/* een korte taak in de week: alleen de titel (de tijd staat in de omschrijving van de knop en zie je aan de plek) */
.tl-board[data-days="7"] .tl-item.tl-short .tl-time { display: none; }
.tl-board[data-days="7"] .tl-project { display: none; }
.tl-daynum, .tl-dayname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-item.tl-movable .tl-open { cursor: grab; touch-action: none; }
.tl-item.tl-virtual .tl-open { opacity: 0.7; border-left-style: dashed; }
.tl-time { font-size: 0.7rem; color: var(--text-soft); white-space: nowrap; }
.tl-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tl-chip .tl-title, .tl-plan-item .tl-title { font-weight: 500; white-space: nowrap; }
.tl-project { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; color: var(--text-soft); }
.tl-resize { position: absolute; left: 6px; right: 6px; bottom: 0; height: 7px; cursor: ns-resize; touch-action: none; }
.tl-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--text-soft); opacity: 0; }
.tl-item:hover .tl-resize::after { opacity: 0.6; }
.tl-chip, .tl-plan-item { list-style: none; }
.tl-chip .tl-open, .tl-plan-item .tl-open { flex-direction: row; align-items: center; gap: 6px; min-height: 26px; }
.tl-dragging { opacity: 0.35; }
.tl-armed .tl-open { outline: 2px solid var(--accent); }
.tl-busy, .tl-busy * { cursor: grabbing !important; user-select: none; }
.tl-drop { position: absolute; left: 2px; right: 2px; border: 2px dashed var(--accent); border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none; z-index: 2; }
.tl-drop-time { position: absolute; top: 2px; left: 6px; font-size: 0.7rem; font-weight: 700; color: var(--accent); }
.tl-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--p1); pointer-events: none; z-index: 1; }
.tl-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--p1); }
.tl-plan { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; max-height: min(78vh, 980px); overflow-y: auto; }
.tl-plan .subheading { margin: 0; }
.tl-plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tl-when { font-size: 0.7rem; color: var(--p1-text, var(--p1)); white-space: nowrap; }
.tl-switch { margin-left: 4px; }
@media (max-width: 760px) {
  .tl { --tl-gutter: 40px; --tl-hour: 44px; }
  .tl-main { grid-template-columns: 1fr; }
  .tl-board[data-days="7"] { overflow-x: auto; }
  .tl-board[data-days="7"] .tl-headrow, .tl-board[data-days="7"] .tl-alldayrow, .tl-board[data-days="7"] .tl-grid { min-width: 720px; }
  .tl-plan { max-height: none; }
}

/* ---------- het losse venster Taak toevoegen van de desktop-app (core/desktop.js) ---------- */
/* Alleen het venster zelf: de rest van de app staat er wel (voor de gegevens), maar niet in beeld. */
body.desktop-quickadd > :not(dialog):not(#toasts) { display: none !important; } /* meldingen (een fout bij toevoegen) blijven zichtbaar */
/* het venster zelf is doorzichtig (zoals bij Todoist): alleen de kaart is te zien, met een schaduw */
html:has(body.desktop-quickadd), body.desktop-quickadd { background: transparent !important; }
body.desktop-quickadd dialog::backdrop { background: transparent; }
body.desktop-quickadd dialog { margin: 16px auto auto; max-height: calc(100vh - 32px); box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35); }

/* ---------- vegen op een aanraakscherm (ui/swipe.js) ---------- */
@media (pointer: coarse) { li.task:not(.task-card) { touch-action: pan-y; } }
.swipe-host { position: relative; }
li.task.swiping { z-index: 1; transition: none; }
li.task.swipe-back { transition: transform 0.18s ease-out; }
.swipe-under {
  position: absolute; left: 0; right: 0; z-index: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  color: #fff; background: var(--line); pointer-events: none;
}
.swipe-under[data-side="right"] .swipe-right, .swipe-under[data-side="left"] .swipe-left { visibility: hidden; }
.swipe-under.swipe-armed[data-action="complete"] { background: var(--ok, #2b9a45); }
.swipe-under.swipe-armed[data-action="schedule"], .swipe-under.swipe-armed[data-action="select"] { background: var(--accent); }
.swipe-under.swipe-armed[data-action="reminders"] { background: #b86e00; }
.swipe-under.swipe-armed[data-action="delete"] { background: var(--danger, #c0372c); }
.swipe-under svg { width: 22px; height: 22px; }

/* de beschrijving van een sectie onder de kop (render.js group) */
.section-desc { margin: -2px 0 8px 32px; color: var(--text-soft); font-size: 0.88rem; line-height: 1.45; }
.section-desc > :first-child { margin-top: 0; }
.section-desc > :last-child { margin-bottom: 0; }
