/* ============================================================
   CROCRO · Task tool
   Day mode  : violet primaire #5B3F8A · ocre #C99656 · crème #F4ECDD · bois #A98668
   Night mode: violet électrique #7E3FF2 · rose #F25EAA · jaune #F2C94C · noir #0E0B14
   ============================================================ */

:root {
  --vincent: #C99656;
  --vincent-soft: #E8C896;
  --daniel: #5B3F8A;
  --daniel-soft: #9078B8;
  --leo: #2E7D6B;
  --leo-soft: #6BAE9D;

  --p-critical: #B8342A;
  --p-high: #C99656;
  --p-medium: #5B3F8A;
  --p-low: #7A8A82;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(14,11,20,.04), 0 1px 1px rgba(14,11,20,.03);
  --shadow-md: 0 8px 24px -8px rgba(14,11,20,.12), 0 2px 6px rgba(14,11,20,.05);
  --shadow-lg: 0 24px 48px -16px rgba(14,11,20,.18), 0 6px 12px rgba(14,11,20,.06);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med: 280ms;

  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ───── Day theme ───── */
[data-theme="day"] {
  --bg: #F4ECDD;
  --bg-elev: #FBF6EC;
  --bg-card: #FFFFFF;
  --surface: #EFE4D0;
  --ink: #1A1118;
  --ink-soft: #5B4D45;
  --ink-mute: #8C7E73;
  --line: rgba(26, 17, 24, 0.08);
  --line-strong: rgba(26, 17, 24, 0.18);
  --accent: #5B3F8A;
  --accent-warm: #C99656;
  --accent-tint: rgba(91, 63, 138, .08);
  --halo: radial-gradient(800px 600px at 100% 0%, rgba(201,150,86,.18), transparent 60%),
          radial-gradient(900px 700px at 0% 100%, rgba(91,63,138,.10), transparent 55%);
}

/* ───── Night theme ───── */
[data-theme="night"] {
  --bg: #0E0B14;
  --bg-elev: #15101D;
  --bg-card: #1B1428;
  --surface: #221932;
  --ink: #F4ECDD;
  --ink-soft: #C9BCD4;
  --ink-mute: #897A99;
  --line: rgba(244, 236, 221, 0.08);
  --line-strong: rgba(244, 236, 221, 0.18);
  --accent: #F25EAA;
  --accent-warm: #F2C94C;
  --accent-tint: rgba(126, 63, 242, .15);
  --halo: radial-gradient(900px 700px at 100% 0%, rgba(242,94,170,.18), transparent 55%),
          radial-gradient(1100px 800px at 0% 100%, rgba(126,63,242,.22), transparent 60%);

  --vincent: #F2C94C;
  --vincent-soft: rgba(242,201,76,.25);
  --daniel: #7E3FF2;
  --daniel-soft: rgba(126,63,242,.30);
  --leo: #5EE3C1;
  --leo-soft: rgba(94,227,193,.25);
}

/* ───── Reset ───── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: var(--halo);
  background-attachment: fixed;
  transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
  overflow-x: hidden;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
em { font-style: italic; opacity: .7; font-weight: 400; }

/* ───── Grain texture ───── */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
[data-theme="night"] .grain { opacity: 0.06; mix-blend-mode: soft-light; }

/* ───── Topbar ───── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 4vw, 56px) 20px;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-elev);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-md);
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

.brand h1 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variation-settings: 'opsz' 96;
  line-height: 1;
}

.brand .tagline {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap svg {
  position: absolute;
  left: 14px;
  width: 16px; height: 16px;
  color: var(--ink-mute);
  pointer-events: none;
}
.search-wrap input {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 16px 10px 40px;
  width: 320px;
  max-width: 50vw;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.search-wrap input::placeholder { color: var(--ink-mute); }
.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

/* ───── Theme toggle ───── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: all var(--dur-fast) var(--ease-out);
  font-weight: 500;
}
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle .theme-divider {
  width: 1px; height: 12px; background: var(--line-strong);
}
[data-theme="day"] .theme-toggle .theme-sun { color: var(--ink); font-weight: 600; }
[data-theme="night"] .theme-toggle .theme-moon { color: var(--accent); font-weight: 600; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--dur-fast) var(--ease-out);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary span { font-size: 18px; line-height: 1; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
[data-theme="night"] .btn-primary {
  background: linear-gradient(135deg, #7E3FF2, #F25EAA);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--line-strong); color: var(--ink); }

.btn-danger {
  background: transparent;
  color: var(--p-critical);
  border-color: rgba(184,52,42,.3);
}
.btn-danger:hover { background: rgba(184,52,42,.08); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--ink-soft);
  transition: all var(--dur-fast) var(--ease-out);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }

/* ───── People + filters ───── */
.people-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 8px clamp(20px, 4vw, 56px) 24px;
  flex-wrap: wrap;
}

.people-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.person-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  min-width: 180px;
  position: relative;
  overflow: hidden;
  transition: all var(--dur-med) var(--ease-out);
}
.person-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--person-color);
  opacity: 0.04;
  pointer-events: none;
}
.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.person-card-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.person-card-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.person-card-role {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}
.person-card-stats {
  display: flex; gap: 16px; margin-top: 4px;
}
.stat {
  display: flex; flex-direction: column; gap: 2px;
}
.stat-num {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 60;
  line-height: 1;
}
.stat-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ───── Filters ───── */
.filters {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: all var(--dur-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
[data-theme="night"] .chip-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.dot-vincent { background: var(--vincent); }
.dot-daniel { background: var(--daniel); }
.dot-leo { background: var(--leo); }

.select {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out);
  min-width: 200px;
}
.select:focus { border-color: var(--accent); }

.filter-actions { flex-direction: row; gap: 8px; }

/* ───── Board ───── */
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px clamp(20px, 4vw, 56px) 80px;
  align-items: start;
}

.column {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.column.drop-over {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.column-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.column-header h2 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  flex: 1;
  font-variation-settings: 'opsz' 36;
}
.column-status {
  font-size: 32px;
  line-height: 0;
  margin-top: -4px;
}
.status-idea { color: var(--ink-mute); }
.status-todo { color: var(--daniel); }
.status-doing { color: var(--vincent); }
.status-review { color: #B8342A; }
.status-done { color: #2E7D6B; }
[data-theme="night"] .status-todo { color: var(--accent); }
[data-theme="night"] .status-doing { color: var(--vincent); }
[data-theme="night"] .status-review { color: var(--accent); }
[data-theme="night"] .status-done { color: var(--leo); }

.count {
  font-family: var(--serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-mute);
  background: var(--surface);
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 500;
}

.column-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 100px;
}

.column-final {
  background: linear-gradient(180deg, var(--bg-elev) 0%, color-mix(in oklab, var(--accent-warm) 6%, var(--bg-elev)) 100%);
}

/* ───── Card ───── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  cursor: grab;
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card.dragging { opacity: 0.4; cursor: grabbing; }

/* SortableJS — états drag */
.card-ghost {
  opacity: 0.3;
  background: var(--accent-tint) !important;
  border: 1px dashed var(--accent) !important;
}
.card-ghost > * { visibility: hidden; }

.card-chosen {
  cursor: grabbing;
}

.card-dragging {
  cursor: grabbing !important;
  box-shadow: var(--shadow-lg) !important;
  transform: rotate(1deg) scale(1.02);
  z-index: 1000;
}

.column.drop-ready {
  background: color-mix(in oklab, var(--accent-tint) 50%, var(--bg-elev));
}
.column.drop-ready.drop-over {
  border-color: var(--accent);
  background: var(--accent-tint);
}

/* Pas de sélection accidentelle pendant le drag tactile */
.column-body { -webkit-user-select: none; user-select: none; }
.card-title, .card-desc, .card-domain { -webkit-user-select: text; user-select: text; }

.card-priority-stripe {
  position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}
.card[data-priority="critical"] .card-priority-stripe { background: var(--p-critical); }
.card[data-priority="high"] .card-priority-stripe { background: var(--p-high); }
.card[data-priority="medium"] .card-priority-stripe { background: var(--p-medium); }
.card[data-priority="low"] .card-priority-stripe { background: var(--p-low); opacity: 0.4; }

.card-domain {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.card-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-variation-settings: 'opsz' 36;
  color: var(--ink);
}

.card-desc {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.card-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phase-tag {
  display: inline-block;
  background: var(--accent-tint);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.note-badge {
  font-size: 10px;
  color: var(--ink-mute);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.assignee-stack { display: flex; }
.assignee-stack .avatar {
  margin-left: -6px;
  border: 2px solid var(--bg-card);
}
.assignee-stack .avatar:first-child { margin-left: 0; }

.due {
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.due.overdue { color: var(--p-critical); font-weight: 600; }
.due.soon { color: var(--vincent); font-weight: 600; }

[data-theme="night"] .due.soon { color: var(--vincent); }

/* ───── Avatars ───── */
.avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  font-family: var(--sans);
  color: #fff;
  flex-shrink: 0;
}
.avatar-vincent { background: var(--vincent); color: #1A1118; }
.avatar-daniel { background: var(--daniel); }
.avatar-leo { background: var(--leo); }
[data-theme="night"] .avatar-vincent { color: #0E0B14; }

.avatar-lg { width: 36px; height: 36px; font-size: 14px; }

/* ───── Empty state ───── */
.empty-col {
  text-align: center;
  padding: 24px 12px;
  color: var(--ink-mute);
  font-size: 12px;
  font-style: italic;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  margin: 4px;
}

/* ───── Modal ───── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(14, 11, 20, 0.5);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out);
  padding: 24px;
}
.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--dur-med) var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.modal-backdrop.is-open .modal { transform: translateY(0) scale(1); }

.modal-sm { max-width: 520px; }

.lead {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hint {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
}

.phase-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--ink-soft);
}
.phase-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.phase-list li strong {
  font-weight: 500;
  color: var(--ink);
}
.phase-list li span {
  font-variant-numeric: tabular-nums;
  color: var(--ink-mute);
  font-family: var(--serif);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 60;
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-spacer { flex: 1; }

/* ───── Form fields ───── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.field input[type="text"],
.field input[type="date"],
.field textarea,
.field select {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  outline: none;
  transition: all var(--dur-fast) var(--ease-out);
  font-family: inherit;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

#taskTitle { font-family: var(--serif); font-size: 18px; font-weight: 500; }

/* ───── Assignee picker ───── */
.assignee-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.assignee-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: left;
  transition: all var(--dur-fast) var(--ease-out);
}
.assignee-btn:hover { border-color: var(--line-strong); }
.assignee-btn.selected {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.assignee-name {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.assignee-name small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  margin-top: 2px;
}

/* ───── Notes ───── */
.notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}
.notes-list:empty { display: none; }
.notes-list li {
  background: var(--bg-card);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.notes-list .note-text { flex: 1; }
.notes-list .note-date {
  font-size: 10px;
  color: var(--ink-mute);
  flex-shrink: 0;
  letter-spacing: 0.06em;
}
.notes-list .note-del {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-mute);
  flex-shrink: 0;
  opacity: 0;
  transition: all var(--dur-fast) var(--ease-out);
}
.notes-list li:hover .note-del,
.notes-list .note-del:focus {
  opacity: 1;
}
.notes-list .note-del:hover {
  background: rgba(184,52,42,.1);
  color: var(--p-critical);
}

.note-input-row { display: flex; gap: 6px; }
.note-input-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.note-input-row input:focus { border-color: var(--accent); }

/* ───── Toast ───── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transition: all var(--dur-med) var(--ease-out);
  z-index: 200;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ───── Scrollbar ───── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }

/* ───── Responsive ───── */
@media (max-width: 1100px) {
  .board { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); overflow-x: visible; }
}
@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .search-wrap input { width: 100%; }
  .topbar-controls { justify-content: space-between; }
  .field-row { grid-template-columns: 1fr; }
  .assignee-picker { grid-template-columns: 1fr; }
  .filters { gap: 12px; }
  .people-stats { width: 100%; }
  .person-card { flex: 1; min-width: 140px; }
}

/* ───── Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
