/* ============================================================
   Whakaaro — base styles
   Light + dark mode via CSS custom properties.
   ============================================================ */

:root {
  --bg: #f5f7fb;
  --bg-gradient-1: #ede9fe;
  --bg-gradient-2: #dbeafe;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --surface-3: #e2e8f0;
  --border: #e2e6ee;
  --text: #1a2332;
  --text-muted: #5e6b80;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-text: #ffffff;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --danger-text: #ffffff;
  --success: #166534;
  --success-bg: #dcfce7;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow:    0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, .14);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --bg-gradient-1: #1e1b4b;
  --bg-gradient-2: #0c4a6e;
  --surface: #131c2e;
  --surface-2: #1a2540;
  --surface-3: #243049;
  --border: #243049;
  --text: #e7ecf5;
  --text-muted: #94a3b8;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-text: #0b1220;
  --danger: #fca5a5;
  --danger-bg: rgba(220, 38, 38, .15);
  --danger-text: #0b1220;
  --success: #86efac;
  --success-bg: rgba(22, 163, 74, .15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 4px 12px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .2s ease, color .2s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1 { font-size: 1.6rem; letter-spacing: -.01em; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; letter-spacing: -.005em; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .75rem; }

.muted { color: var(--text-muted); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1rem;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .04s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-text); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.btn--danger { background: var(--danger); color: var(--danger-text); }
.btn--danger:hover { background: var(--danger); color: var(--danger-text); filter: brightness(1.1); text-decoration: none; }
.btn--sm { padding: .35rem .7rem; font-size: 13px; }

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: background-color .15s, color .15s, transform .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.is-starred { color: #f59e0b; filter: drop-shadow(0 0 6px rgba(245,158,11,.5)); }

.back-link {
  font-size: 22px;
  font-weight: 400;
  color: var(--text-muted);
  margin-right: .5rem;
}
.back-link:hover { color: var(--text); text-decoration: none; }

/* ============================================================
   Forms
   ============================================================ */
.form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.form label,
.admin-form label,
.dialog__form label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.form input[type="email"],
.form input[type="password"],
.form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="text"],
.admin-form select,
.dialog__form input[type="text"],
.dialog__form textarea,
.dialog__form select {
  padding: .65rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form input::placeholder, .dialog__form textarea::placeholder { color: var(--text-muted); opacity: .7; }
.form input:focus,
.admin-form input:focus,
.admin-form select:focus,
.dialog__form input:focus,
.dialog__form textarea:focus,
.dialog__form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.form button[type="submit"] { margin-top: .5rem; padding: .8rem 1rem; font-size: 15px; }

.inline-form { display: inline; }

/* ============================================================
   Auth pages
   ============================================================ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background:
    radial-gradient(ellipse at top left,    var(--bg-gradient-1), transparent 55%),
    radial-gradient(ellipse at bottom right, var(--bg-gradient-2), transparent 55%),
    var(--bg);
}
.auth-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.brand {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #ec4899));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub { margin: .35rem 0 0; color: var(--text-muted); font-size: 14px; }
.auth-alt { margin: 1.5rem 0 0; text-align: center; font-size: 14px; color: var(--text-muted); }

/* ============================================================
   Flash messages
   ============================================================ */
.flash {
  margin: 1rem 0 0;
  padding: .65rem .85rem;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid transparent;
}
.flash--error   { background: var(--danger-bg);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.flash--success { background: var(--success-bg); color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }

/* ============================================================
   Theme toggle
   ============================================================ */
.theme-toggle {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: background-color .15s, border-color .15s, transform .15s;
}
.theme-toggle:hover { background: var(--surface-2); transform: rotate(15deg); }
.theme-toggle::before { content: "🌙"; font-size: 16px; line-height: 1; }
[data-theme="dark"] .theme-toggle::before { content: "☀️"; }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
  gap: 1rem;
}
.topbar__brand { display: flex; align-items: center; font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; }
.topbar__brand a {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #ec4899));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: none;
}
.topbar__nav { display: flex; gap: .25rem; flex: 1; margin-left: 1rem; }
.topbar__nav a {
  padding: .35rem .8rem; border-radius: var(--radius);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.topbar__nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topbar__nav a.active { background: var(--surface-2); color: var(--text); }
.topbar__right { display: flex; align-items: center; gap: .5rem; }
.topbar__right .theme-toggle { position: static; }
.topbar__user { font-size: 14px; color: var(--text-muted); }

/* board topbar variant — board-color tint */
.topbar--board {
  background: linear-gradient(180deg, color-mix(in srgb, var(--board-accent, var(--accent)) 15%, var(--surface)), var(--surface));
  border-bottom-color: color-mix(in srgb, var(--board-accent, var(--accent)) 25%, var(--border));
}
.board-title-display {
  background: none;
  -webkit-text-fill-color: var(--text);
  color: var(--text);
}

/* ============================================================
   Container
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.section-title { margin: 1.5rem 0 .75rem; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }

/* ============================================================
   Boards-overzicht — tegels
   ============================================================ */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.board-tile {
  position: relative;
  display: flex; align-items: flex-end;
  height: 110px;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--tile-color, var(--accent)), color-mix(in srgb, var(--tile-color, var(--accent)) 60%, #000));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
  overflow: hidden;
}
.board-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: #fff;
}
.board-tile__title {
  position: relative;
  z-index: 1;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.board-tile__star {
  position: absolute;
  top: .6rem; right: .6rem;
  font-size: 14px;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

/* Image-tegel: donkere gradient over de foto zodat de titel leesbaar blijft */
.board-tile--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .15) 50%, rgba(0, 0, 0, .65) 100%);
  border-radius: inherit;
  pointer-events: none;
}
.board-tile--add {
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
  border: 2px dashed var(--border);
  align-items: center;
  justify-content: center;
  font-weight: 500;
  box-shadow: none;
}
.board-tile--add:hover { color: var(--accent) !important; border-color: var(--accent); }

/* ============================================================
   Board-detail (Trello-stijl)
   ============================================================ */
.board-page { background: color-mix(in srgb, var(--board-accent, var(--accent)) 10%, var(--bg)); min-height: 100vh; }

.board-canvas {
  height: calc(100vh - 56px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem 1rem 1.5rem;
}
.lists-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  height: 100%;
  min-width: max-content;
}

.list {
  display: flex;
  flex-direction: column;
  width: 290px;
  max-height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex: 0 0 290px;
}
.list__header {
  display: flex; align-items: center; gap: .35rem;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--border);
  cursor: grab;
}
.list__header:active { cursor: grabbing; }
.list__title {
  flex: 1;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  padding: .25rem .4rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  cursor: text;
  width: 100%;
}
.list__title:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}
.list__menu { width: 28px; height: 28px; font-size: 18px; }

.list__cards {
  display: flex; flex-direction: column; gap: .4rem;
  padding: .6rem;
  overflow-y: auto;
  flex: 1;
  min-height: 4px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem .7rem;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color .12s, border-color .12s, transform .04s;
}
.card:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.card:active { transform: translateY(1px); }
.card__title { word-break: break-word; }

.list__add { padding: .5rem .6rem .65rem; }
.list__add-btn {
  width: 100%; padding: .45rem; text-align: left;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-muted); font-size: 14px; border-radius: var(--radius-sm);
  font-family: inherit;
}
.list__add-btn:hover { background: var(--surface-2); color: var(--text); }
.list__add-form textarea {
  width: 100%; resize: vertical;
  padding: .55rem .65rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-size: 14px; font-family: inherit;
}
.list__add-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.list__add-actions { display: flex; gap: .5rem; margin-top: .5rem; }
.is-hidden { display: none !important; }

.list-add {
  flex: 0 0 290px;
  align-self: flex-start;
}
.list-add__btn {
  width: 100%; padding: .8rem;
  background: rgba(255,255,255,.5); color: var(--text);
  border: 2px dashed var(--border); border-radius: var(--radius);
  cursor: pointer; font-size: 14px; font-weight: 500;
  font-family: inherit;
  transition: background-color .15s, color .15s, border-color .15s;
}
[data-theme="dark"] .list-add__btn { background: rgba(255,255,255,.05); }
.list-add__btn:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.list-add__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.list-add__form input { padding: .55rem .65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-family: inherit; font-size: 14px; }
.list-add__form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.list-add__form > div { display: flex; gap: .5rem; }

/* drag state */
.is-dragging { opacity: .4; }

/* ============================================================
   Dialog
   ============================================================ */
dialog.dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: var(--shadow-lg);
  max-width: 460px;
  width: calc(100% - 2rem);
}
dialog.dialog--wide { max-width: 640px; }
dialog.dialog::backdrop { background: rgba(15,23,42,.5); backdrop-filter: blur(2px); }
.dialog__form { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; }
.dialog__actions { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }

.color-picker { display: flex; gap: .4rem; flex-wrap: wrap; padding-top: .25rem; }
.color-swatch {
  --swatch: var(--accent);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer; position: relative;
  border: 2px solid transparent;
  transition: transform .1s, border-color .1s;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.color-swatch:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }

/* ============================================================
   Admin page
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.stat-card__label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
.stat-card__value { font-size: 1.85rem; font-weight: 700; line-height: 1.1; margin-top: .35rem; letter-spacing: -.02em; }
.stat-card__sub { font-size: 12px; color: var(--text-muted); margin-top: .25rem; }

.admin-section { margin: 2rem 0; }

.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  margin-top: 1rem;
}
.admin-table th, .admin-table td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table thead th { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table select { padding: .3rem .5rem; font-size: 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-family: inherit; }
.badge { display: inline-block; padding: 1px 6px; font-size: 11px; background: var(--accent); color: var(--accent-text); border-radius: 999px; margin-left: .35rem; vertical-align: middle; }

.admin-form { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.admin-form--inline { flex-direction: row; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.admin-collapsible {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1rem;
  margin-top: 1rem;
}
.admin-collapsible > summary {
  cursor: pointer; padding: .75rem 0;
  font-weight: 500;
  list-style: none;
}
.admin-collapsible > summary::-webkit-details-marker { display: none; }
.admin-collapsible > summary:hover { color: var(--accent); }
.admin-collapsible[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.admin-collapsible .admin-form { padding-bottom: 1rem; }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__slider {
  position: relative;
  width: 40px; height: 22px;
  background: var(--surface-3);
  border-radius: 999px;
  transition: background-color .15s;
}
.switch__slider::before {
  content: "";
  position: absolute;
  left: 2px; top: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform .15s;
}
.switch input:checked + .switch__slider { background: var(--accent); }
.switch input:checked + .switch__slider::before { transform: translateX(18px); }
.switch__label { font-size: 14px; font-weight: 500; }

/* ============================================================
   Background picker
   ============================================================ */
.page-head__actions { display: flex; gap: .5rem; align-items: center; }

.bg-picker { padding: 1.25rem; }
.bg-picker__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.bg-picker__head h3 { margin: 0; }

.bg-picker__tabs {
  display: flex; gap: .25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.bg-tab {
  padding: .55rem 1rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.bg-tab:hover { color: var(--text); }
.bg-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.bg-picker__panel { min-height: 260px; }

.bg-section-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); font-weight: 600;
  margin: 0 0 .5rem;
}
.bg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.bg-swatch {
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.bg-swatch:hover { transform: scale(1.05); border-color: var(--accent); box-shadow: var(--shadow-sm); }

.bg-search {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 1rem;
}
.bg-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.bg-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .5rem;
  min-height: 200px;
}
.bg-image {
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.bg-image:hover { transform: scale(1.04); border-color: var(--accent); box-shadow: var(--shadow); }
.bg-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 14px;
}

.bg-picker__foot {
  display: flex; gap: .5rem; align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Credit chip (Unsplash atribute requirement) */
.bg-credit {
  position: fixed;
  bottom: .65rem; right: .65rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  padding: .35rem .65rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  z-index: 5;
  pointer-events: auto;
  max-width: 90vw;
}
.bg-credit a { color: #fff; text-decoration: underline; }
.bg-credit a:hover { color: #fff; }

/* Body met custom bg = topbar krijgt blur-laag voor leesbaarheid */
body[style*="background"] .topbar {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}
body[style*="background"] .container { padding-top: 2rem; }
body[style*="background"] .board-canvas { background: transparent; }

/* ============================================================
   Status-list (settings page)
   ============================================================ */
.status-list {
  list-style: none; padding: 0; margin: 1rem 0;
  display: flex; flex-direction: column; gap: .5rem;
}
.status-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  display: flex; align-items: center; gap: .65rem;
  font-size: 14px;
}
.status-list li .muted { margin-left: auto; font-size: 13px; }

/* Voice/telegram source-badge op cards */
.card__badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  margin-bottom: .2rem;
  font-weight: 500;
}

/* ============================================================
   Toast notifications
   ============================================================ */
.toast-host {
  position: fixed; bottom: 1rem; right: 1rem;
  display: flex; flex-direction: column; gap: .5rem;
  z-index: 100;
}
.toast {
  padding: .65rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  max-width: 320px;
  animation: toastIn .2s ease;
}
.toast--error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.toast--success { border-color: color-mix(in srgb, var(--success) 50%, transparent); color: var(--success); }
.toast--out { opacity: 0; transform: translateX(20px); transition: opacity .2s, transform .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 640px) {
  .auth-card { padding: 1.5rem; }
  .topbar { padding: .65rem .9rem; flex-wrap: wrap; }
  .topbar__nav { order: 3; flex-basis: 100%; margin-left: 0; margin-top: .5rem; }
  .topbar__user { display: none; }
  .container { padding: 1rem .9rem; }
  .board-canvas { padding: .75rem .75rem 1rem; }
  .list { width: 270px; flex-basis: 270px; }
  .list-add { flex-basis: 270px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-table { font-size: 13px; }
  .admin-table th, .admin-table td { padding: .5rem .65rem; }
  /* Verberg minder kritieke kolommen op mobiel */
  .admin-table th:nth-child(5), .admin-table td:nth-child(5),
  .admin-table th:nth-child(6), .admin-table td:nth-child(6) { display: none; }
}
