/* =====================================================================
   Werkdashboard — token-gedreven ontwerp
   Rustig, strak, productiviteits-tooling (Linear/Things-register).
   Thema (auto/licht/donker), accentkleur en lettertype zijn instelbaar.
   ===================================================================== */

/* ---- Lettertypekeuzes (alleen systeemfonts; geen externe bestanden) ---- */
:root[data-font="system"]  { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; }
:root[data-font="rounded"] { --font: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif; }
:root[data-font="serif"]   { --font: "Iowan Old Style", "Palatino Linotype", Georgia, serif; }
:root[data-font="mono"]    { --font: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace; }

/* ---- Lichte tokens (standaard) ---- */
:root, :root[data-theme="light"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --surface-hover: #f3f4f6;
  --text: #14171c;
  --text-2: #5a626d;
  --text-3: #939aa4;
  --border: #e7e9ed;
  --border-2: #d9dce1;
  --accent: #3b6ef5;
  --accent-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(18,22,31,.06);
  --shadow: 0 6px 24px -10px rgba(18,22,31,.18);
  --shadow-pop: 0 16px 48px -16px rgba(18,22,31,.30);
  --p-spoed: #ef4444; --p-hoog: #f97316; --p-middel: #eab308; --p-normaal: #10b981; --p-laag: #10b981; --p-onhold: #94a3b8;
  --navbar: rgba(255,255,255,.72);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1014;
  --surface: #161a20;
  --surface-2: #1d232b;
  --surface-hover: #20262f;
  --text: #e7eaef;
  --text-2: #9aa3af;
  --text-3: #6b7480;
  --border: #232a33;
  --border-2: #2c343f;
  --accent: #5b86f7;
  --accent-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 8px 28px -12px rgba(0,0,0,.6);
  --shadow-pop: 0 20px 56px -20px rgba(0,0,0,.7);
  --p-spoed: #f87171; --p-hoog: #fb923c; --p-middel: #facc15; --p-normaal: #34d399; --p-laag: #34d399; --p-onhold: #8b95a3;
  --navbar: rgba(22,26,32,.72);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0d1014; --surface: #161a20; --surface-2: #1d232b; --surface-hover: #20262f;
    --text: #e7eaef; --text-2: #9aa3af; --text-3: #6b7480; --border: #232a33; --border-2: #2c343f;
    --accent: #5b86f7; --accent-ink: #fff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 8px 28px -12px rgba(0,0,0,.6); --shadow-pop: 0 20px 56px -20px rgba(0,0,0,.7);
    --p-spoed: #f87171; --p-hoog: #fb923c; --p-middel: #facc15; --p-normaal: #34d399; --p-laag: #34d399; --p-onhold: #8b95a3;
    --navbar: rgba(22,26,32,.72); color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.005em;
}
h1, h2 { letter-spacing: -.02em; }
input, button, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* ---- Knoppen ---- */
.btn {
  border: 1px solid transparent; border-radius: 10px; padding: 9px 15px;
  font-weight: 560; font-size: 14px; cursor: pointer; background: var(--surface-2); color: var(--text);
  transition: background .14s, transform .06s, box-shadow .14s, border-color .14s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; white-space: nowrap;
}
.btn:active { transform: scale(.975); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn--ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: transparent; border-color: var(--border-2); color: var(--p-spoed); }
.btn--danger:hover { background: color-mix(in srgb, var(--p-spoed) 10%, transparent); }
.btn--block { width: 100%; }
.btn--sm { min-height: 34px; padding: 7px 13px; font-size: 13.5px; border-radius: 9px; }

/* ---- Velden ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 560; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], select, textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
select { -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23939aa4' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }

/* ---- Authenticatie ---- */
.auth { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth__card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 30px 26px; box-shadow: var(--shadow); }
.auth__brand { text-align: center; margin-bottom: 22px; }
.auth__logo { border-radius: 14px; box-shadow: var(--shadow-sm); }
.auth__brand h1 { font-size: 22px; font-weight: 680; margin: 14px 0 4px; }
.auth__sub { color: var(--text-2); margin: 0; font-size: 14px; }
.auth__form { display: flex; flex-direction: column; gap: 14px; }
.auth__form .btn { margin-top: 4px; }
.auth__error { color: var(--p-spoed); font-size: 13px; margin: -4px 0 0; min-height: 16px; }

/* ---- Segmented control ---- */
.segmented { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 3px; }
.segmented--sm { width: fit-content; }
.segmented__opt {
  flex: 1; border: none; background: transparent; color: var(--text-2); padding: 7px 13px; border-radius: 8px;
  font-size: 13px; font-weight: 560; cursor: pointer; transition: background .14s, color .14s; white-space: nowrap;
}
.segmented__opt.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .segmented__opt.is-active { background: var(--surface-hover); }

/* ---- Topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 4px;
  height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0;
  background: var(--navbar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar__back { background: none; border: none; color: var(--accent); cursor: pointer; padding: 6px; display: inline-flex; border-radius: 8px; }
.topbar__back:hover { background: var(--surface-2); }
.topbar__title { font-size: 16px; font-weight: 620; }
.topbar__spacer { flex: 1; }

/* ---- Layout ---- */
#main { max-width: 1100px; margin: 0 auto; padding: 4px 18px calc(96px + env(safe-area-inset-bottom)); }
.view__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 2px 16px; }
.view__head h1 { font-size: 27px; font-weight: 700; margin: 0; }
.section-label { font-size: 11.5px; font-weight: 620; text-transform: uppercase; letter-spacing: .055em; color: var(--text-3); margin: 28px 2px 9px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }

/* ---- Tegels (projecten) ---- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 13px; }
.tile {
  position: relative; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-sm); padding: 15px 16px; min-height: 112px; cursor: pointer; display: flex; flex-direction: column;
  justify-content: space-between; gap: 14px; transition: transform .1s, box-shadow .16s, border-color .16s;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-2); }
.tile:active { transform: translateY(0); }
.tile__top { display: flex; align-items: flex-start; gap: 9px; }
.tile__dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.tile__name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tile__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile__badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.tile__progress { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tile--onhold { opacity: .6; }
.tile--add { align-items: center; justify-content: center; color: var(--text-3); border-style: dashed; font-weight: 560; gap: 6px; }
.tile--add:hover { color: var(--accent); border-color: var(--accent); }

.p-spoed { background: var(--p-spoed); } .p-hoog { background: var(--p-hoog); } .p-middel { background: var(--p-middel); }
.p-normaal { background: var(--p-normaal); } .p-laag { background: var(--p-laag); } .p-onhold { background: var(--p-onhold); }

/* ---- Rijen / deadlines ---- */
.rows { list-style: none; margin: 0; padding: 0; }
.deadline-filter { padding: 15px 16px 6px; }
.deadline-filter__row { display: flex; justify-content: space-between; color: var(--text-2); font-size: 13.5px; margin-bottom: 8px; }
.deadline-filter__row strong { color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); height: 26px; cursor: pointer; }
.row-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 12px 16px; border-top: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.row-item:hover { background: var(--surface-hover); }
.row-item__main { min-width: 0; }
.row-item__text { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.row-item__sub { font-size: 12.5px; color: var(--text-3); }
.row-item__date { font-size: 12.5px; color: var(--text-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-item--overdue .row-item__date { color: var(--p-spoed); font-weight: 600; }
.empty { color: var(--text-3); padding: 22px 16px; text-align: center; font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---- Project-detail ---- */
.topic-head { padding: 6px 18px 16px; }
.topic-head__name { border: none; background: transparent; font-size: 22px; font-weight: 680; padding: 14px 0 12px; }
.topic-head__name:focus { box-shadow: none; }
.topic-head__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); padding-top: 14px; flex-wrap: wrap; }
.inline-field { display: flex; align-items: center; gap: 9px; color: var(--text-2); font-size: 13.5px; }
.inline-field select { width: auto; min-width: 120px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 44px; height: 26px; border-radius: 999px; background: var(--border-2); position: relative; transition: background .2s; flex-shrink: 0; }
.switch__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }

.notes-area, .ideas-pad { display: block; width: 100%; border: none; resize: vertical; background: var(--surface); padding: 16px; min-height: 160px; line-height: 1.55; }
.notes-area:focus, .ideas-pad:focus { box-shadow: none; }
.ideas-pad { min-height: 64vh; border: 1px solid var(--border); }

/* Takenformulier */
.todo-form { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.todo-form__meta { display: flex; gap: 10px; }
.todo-form__meta select, .todo-form__meta input { flex: 1; min-width: 0; }
.todo-form__meta .btn { flex: 0 0 auto; }

.todo-list { list-style: none; margin: 0; padding: 0; }
.todo { border-top: 1px solid var(--border); padding: 11px 16px; }
.todo:first-child { border-top: none; }
.todo__row { display: flex; align-items: center; gap: 12px; }
.check { appearance: none; -webkit-appearance: none; width: 21px; height: 21px; border: 2px solid var(--border-2); border-radius: 7px; cursor: pointer; flex-shrink: 0; position: relative; transition: background .14s, border-color .14s; }
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check--sm { width: 18px; height: 18px; border-radius: 6px; }
.check--sm:checked::after { left: 5px; top: 2px; width: 4px; height: 8px; }
.todo__text { flex: 1; min-width: 0; font-weight: 500; }
.todo.is-done .todo__text { text-decoration: line-through; color: var(--text-3); }
.todo__deadline { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.todo__deadline.overdue { color: var(--p-spoed); font-weight: 600; }
.todo__btns { display: flex; gap: 1px; }
.iconbtn { border: none; background: none; cursor: pointer; color: var(--text-3); padding: 5px; border-radius: 7px; display: inline-flex; transition: background .12s, color .12s; }
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
.iconbtn--danger:hover { color: var(--p-spoed); }
.subtasks { list-style: none; margin: 9px 0 2px; padding: 0 0 0 33px; display: flex; flex-direction: column; gap: 7px; }
.subtask { display: flex; align-items: center; gap: 9px; }
.subtask span { flex: 1; font-size: 13.5px; }
.subtask.is-done span { text-decoration: line-through; color: var(--text-3); }
.subadd { display: flex; gap: 8px; padding: 9px 0 2px 33px; }
.subadd input { flex: 1; }
.inline-edit { display: flex; flex-direction: column; gap: 9px; padding: 2px 0; }
.inline-edit .r { display: flex; gap: 9px; } .inline-edit .r > * { flex: 1; min-width: 0; }

/* Links */
.link-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.link-list:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border-radius: 999px; padding: 6px 8px 6px 13px; }
.chip a { color: var(--accent); text-decoration: none; font-weight: 560; font-size: 13.5px; }
.chip__x { border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 50%; }
.chip__x:hover { color: var(--p-spoed); }
.link-form { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 16px 16px; }
.link-form input { flex: 1 1 130px; }
#btn-delete-topic { margin-top: 26px; }

/* ---- Kanban ---- */
.kfilter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 2px 16px; }
.kfilter__chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-2); background: var(--surface); border-radius: 999px; padding: 6px 13px 6px 11px; font-size: 13px; font-weight: 540; cursor: pointer; color: var(--text-2); transition: all .14s; }
.kfilter__chip .dot { width: 8px; height: 8px; }
.kfilter__chip.is-on { color: var(--text); border-color: transparent; background: var(--surface-2); }
.kfilter__chip.is-off { opacity: .5; }

.kboard { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; touch-action: pan-x; -webkit-overflow-scrolling: touch; }
.kcol { flex: 0 0 272px; background: var(--surface-2); border-radius: 14px; display: flex; flex-direction: column; max-height: 72vh; scroll-snap-align: start; }
.kcol__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.kcol__name { font-weight: 620; font-size: 14px; flex: 1; min-width: 0; cursor: text; }
.kcol__name input { font-weight: 620; font-size: 14px; padding: 4px 8px; }
.kcol__count { font-size: 12px; color: var(--text-3); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.kcol__del { border: none; background: none; color: var(--text-3); cursor: pointer; padding: 3px; border-radius: 6px; display: inline-flex; }
.kcol__del:hover { color: var(--p-spoed); background: var(--surface); }
.kcol-body { padding: 4px 10px 12px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 9px; touch-action: pan-y; min-height: 40px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; box-shadow: var(--shadow-sm); cursor: grab; display: flex; flex-direction: column; gap: 8px; user-select: none; }
.kcard:active { cursor: grabbing; }
.kcard__project { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.kcard__text { font-size: 14px; font-weight: 500; line-height: 1.35; }
.kcard__foot { display: flex; align-items: center; gap: 8px; }
.kcard__deadline { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.kcard__deadline.overdue { color: var(--p-spoed); font-weight: 600; }
.kcard__prio { width: 7px; height: 7px; border-radius: 50%; }
.kcard--ghost { opacity: .35; }
.kcard--drag { position: fixed; z-index: 999; pointer-events: none; box-shadow: var(--shadow-pop); cursor: grabbing; transform: rotate(1.5deg); margin: 0; }
.kplaceholder { border: 2px dashed var(--border-2); border-radius: 11px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.kcol--over { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -2px; }
.kcol-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 14px 4px; }
.kcol--add { flex: 0 0 200px; }
.kadd-form { display: flex; gap: 8px; flex: 0 0 240px; align-items: flex-start; }
.kadd-form input { background: var(--surface); }

/* ---- Instellingen ---- */
.setting-list { display: flex; flex-direction: column; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--border); }
.setting:first-child { border-top: none; }
.setting--col { flex-direction: column; align-items: stretch; gap: 11px; }
.setting--btn { background: none; border: none; border-top: 1px solid var(--border); cursor: pointer; text-align: left; width: 100%; }
.setting--btn:hover { background: var(--surface-hover); }
.setting__label { font-weight: 540; }
.setting__label--danger { color: var(--p-spoed); }
.setting__value { color: var(--text-2); font-size: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 2px var(--surface); transition: transform .1s; position: relative; }
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { border-color: var(--text-2); }
.swatch--custom { display: inline-flex; align-items: center; justify-content: center; background: conic-gradient(from 0deg, #ef4444, #eab308, #10b981, #3b6ef5, #a855f7, #ef4444); color: #fff; overflow: hidden; }
.swatch--custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---- Drijvende navigatiebalk ---- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; gap: 2px; padding: 6px; background: var(--navbar);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--border); border-radius: 17px; box-shadow: var(--shadow-pop);
}
.tabbar__item {
  border: none; background: none; cursor: pointer; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 16px; border-radius: 12px; font-size: 10.5px; font-weight: 560; transition: color .14s, background .14s; min-width: 62px;
}
.tabbar__item svg { width: 21px; height: 21px; }
.tabbar__item:hover { color: var(--text-2); }
.tabbar__item.is-active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 460px) { .tabbar__item { padding: 7px 11px; min-width: 0; } .tabbar__item span { font-size: 10px; } }

/* ---- Modaal ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 540px) { .modal { align-items: center; } }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,12,16,.4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .2s ease; }
.modal__card { position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px 18px 0 0; padding: 22px; box-shadow: var(--shadow-pop); animation: slideup .26s cubic-bezier(.22,1,.36,1); margin: 0 0 env(safe-area-inset-bottom); }
@media (min-width: 540px) { .modal__card { border-radius: 18px; animation: pop .2s ease; margin: 16px; } }
.modal__title { font-size: 18px; font-weight: 650; margin: 0 0 14px; }
.modal__body { display: flex; flex-direction: column; gap: 12px; }
.modal__body p { margin: 0; color: var(--text-2); }
.modal__actions { display: flex; gap: 10px; margin-top: 20px; }
.modal__actions .btn { flex: 1; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 11px; font-size: 13.5px; font-weight: 540; box-shadow: var(--shadow-pop); animation: toastin .2s ease; }
@keyframes toastin { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Uitbreidingen: wachtwoord, herhaling, beheer, lijst-slepen ===== */

/* Wachtwoord tonen/verbergen */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-3); cursor: pointer; padding: 6px; border-radius: 8px; display: inline-flex; }
.pw-toggle:hover { color: var(--text-2); }
.pw-toggle.is-on { color: var(--accent); }

/* Auth-links en -notitie */
.auth__link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13.5px; font-weight: 540; padding: 6px; align-self: center; }
.auth__link:hover { text-decoration: underline; }
.auth__note { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); border-radius: 10px; padding: 11px 13px; font-size: 13px; margin: 0; line-height: 1.45; }

/* Herhaling-markering op taken */
.rep-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 1px 7px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.rep-tag--mini { padding: 1px 5px; }
.iconbtn.is-on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.kcard__rep { color: var(--accent); font-weight: 700; }

/* Kanban: greep en lijst-slepen */
.kcol__grip { cursor: grab; color: var(--text-3); font-size: 13px; letter-spacing: -3px; padding: 2px 4px 2px 0; touch-action: none; user-select: none; line-height: 1; }
.kcol__grip:active { cursor: grabbing; }
.kcol__name-input { font-weight: 620; font-size: 14px; padding: 4px 8px; }
.kcol--dragcol { position: fixed; z-index: 999; pointer-events: none; box-shadow: var(--shadow-pop); transform: rotate(1deg); opacity: .96; max-height: 60vh; }
.kcol--phcol { border: 2px dashed var(--border-2); background: color-mix(in srgb, var(--accent) 6%, transparent); border-radius: 14px; }
.kcol--phcol > * { visibility: hidden; }

/* Instellingen: chevron */
.setting__chev { color: var(--text-3); font-size: 20px; }

/* Beheer */
.admin-badge { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); padding: 1px 7px; border-radius: 999px; vertical-align: middle; margin-left: 4px; }
.reset-flag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--p-spoed); }
.row-item--flagged { background: color-mix(in srgb, var(--p-spoed) 7%, transparent); }
.reset-note { background: color-mix(in srgb, var(--p-spoed) 12%, transparent); color: var(--text); border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 1.45; }
.switch--row { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 14px; }
.switch--row span:first-child { font-weight: 540; color: var(--text); }
.loglist { list-style: none; margin: 0; padding: 0; max-height: 180px; overflow-y: auto; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.loglist li { padding: 5px 0; border-top: 1px solid var(--border); }
.loglist li:first-child { border-top: none; }
.loglist .muted { color: var(--text-3); }
.keybox { margin-top: 12px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.keybox__label { font-size: 12px; color: var(--text-2); }
.keybox code { font-size: 18px; font-weight: 600; letter-spacing: .06em; font-family: ui-monospace, Menlo, monospace; color: var(--accent); user-select: all; }
