:root {
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-soft: #eef2ff;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2430;
  --text-muted: #6b7280;
  --border: #e7e9ee;
  --shadow-sm: 0 1px 2px rgba(20, 24, 36, 0.06), 0 1px 3px rgba(20, 24, 36, 0.04);
  --shadow-md: 0 6px 16px rgba(20, 24, 36, 0.10);
  --radius: 12px;
  --radius-sm: 8px;

  /* Labelkleuren */
  --label-indigo: #6366f1;
  --label-emerald: #10b981;
  --label-amber: #f59e0b;
  --label-rose: #f43f5e;
  --label-slate: #64748b;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 40px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-header__brand { display: flex; align-items: center; gap: 14px; }
.app-header__logo { display: inline-flex; }
.app-header__title { margin: 0; font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; }
.app-header__subtitle { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Board ---------- */
.board {
  flex: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
  padding: clamp(16px, 3vw, 32px);
  overflow-x: auto;
}

.column {
  display: flex;
  flex-direction: column;
  background: transparent;
  min-height: 120px;
}

.column__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 12px;
}

.column__title { margin: 0; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }

.column__count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}

.column__cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px;
  border-radius: var(--radius);
  min-height: 60px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.column__cards.is-drop-target {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.column__empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 18px 8px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.column__add {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  background: transparent;
}
.column__add:hover { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Card ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: #d8dbe2; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card:active { cursor: grabbing; }

.card.is-dragging { opacity: 0.45; }

.card__label {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  margin-bottom: 9px;
}

.card__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 550;
  line-height: 1.35;
  word-break: break-word;
}

.card__desc {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 550;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); }

.btn--ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn--ghost:hover { color: var(--text); border-color: #d8dbe2; background: var(--surface); }

.btn--danger { background: transparent; color: var(--label-rose); border-color: transparent; }
.btn--danger:hover { background: #fff1f2; }

/* ---------- Dialog ---------- */
.dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  width: min(460px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(20, 24, 36, 0.25);
  color: var(--text);
}
.dialog::backdrop { background: rgba(20, 24, 36, 0.35); backdrop-filter: blur(2px); }

.dialog__form { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.dialog__title { margin: 0; font-size: 1.05rem; font-weight: 650; }

.field { display: flex; flex-direction: column; gap: 6px; border: none; padding: 0; margin: 0; }
.field__label { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.field__optional { font-weight: 400; color: var(--text-muted); }

.field__input {
  font: inherit;
  font-size: 0.9rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  width: 100%;
  resize: vertical;
}
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field__input--area { min-height: 64px; line-height: 1.45; }

.label-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.label-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.label-swatch:hover { transform: scale(1.08); }
.label-swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor; }
.label-swatch--none { background: var(--surface); border: 2px dashed var(--border); color: var(--text-muted); }
.label-swatch--none::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 16px; height: 2px; background: currentColor; transform: rotate(45deg);
}

.dialog__actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.dialog__spacer { flex: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .board {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
  }
}
