/* «Завдання». Утверждён 04.12.2026 (docs/design/tasks-*). */

.tasks { max-width: 960px; margin: 0 auto; }
.tasks .seg { margin-bottom: 16px; }
.seg-count { margin-left: 6px; color: var(--muted); font-weight: 400; }

.t-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.t-group-title { font-size: 14px; font-weight: 500; color: var(--muted); }
.t-group-title.is-overdue { color: var(--danger-ink); }
.t-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.t-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  padding: 14px 16px 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--r-card);
  cursor: pointer;
}
.t-item:hover { background: #fbfcfd; }
.t-item.is-new { border-left-color: var(--blue); }
.t-item.is-progress { border-left-color: #d9a441; }
.t-item.is-done { border-left-color: var(--line); }
.t-item.is-done .t-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgb(11 27 61 / 0.3); }
.t-item.is-overdue { border-left-color: var(--active); }
.t-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.t-title { font-weight: 500; }
.t-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.t-due.is-today { color: var(--warn-ink); font-weight: 500; }
.t-due.is-overdue { color: var(--danger-ink); font-weight: 500; }
.t-actions { display: flex; gap: 8px; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.pill-new { background: #e3f1f8; color: var(--date); }
.pill-progress { background: var(--warn-bg); color: var(--warn-ink); }
.pill-done { background: var(--raised); color: var(--muted); }
.pill-overdue { background: #fdecea; color: var(--danger-ink); }

.t-progress { font-size: 14px; color: var(--muted); white-space: nowrap; }

/* карточка */
.t-card-meta { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.t-card-meta dt { color: var(--muted); }
.t-card-meta dd { margin: 0; }
.t-desc { white-space: pre-wrap; }
.t-people { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.t-people li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.t-people li + li { border-top: 1px solid var(--line-soft); }
.t-people-when { font-size: 13px; color: var(--muted); }

/* форма */
.textarea { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.t-who { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.t-who legend { grid-column: 1 / -1; margin-bottom: 6px; padding: 0; }
.t-who .check { min-height: 40px; }
.t-when { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-nav);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.chip:hover { background: var(--raised); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.t-empty { padding: 32px 0; color: var(--muted); text-align: center; }
.t-group summary { cursor: pointer; list-style: none; }
.t-group summary::-webkit-details-marker { display: none; }
.t-group summary::before { content: "▸ "; }
.t-group[open] summary::before { content: "▾ "; }
.t-group[open] summary { margin-bottom: 8px; }

@media (max-width: 767px) {
  .tasks .seg { display: flex; width: 100%; }
  .tasks .seg-item { flex: 1; padding: 8px 6px; font-size: 14px; }
  .t-item { grid-template-columns: 1fr; padding: 12px 14px 12px 16px; }
  .t-actions .btn { flex: 1; }
  .t-who { grid-template-columns: 1fr; }
}
