/* Tasks (#/tasks?kind=family|staff) */
.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.tk-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left; border: 1.5px solid transparent; cursor: pointer; color: var(--text); }
.tk-stat > .ico { color: var(--teal-strong); margin-bottom: 4px; }
.tk-stat b { font-family: var(--font-display); font-size: 28px; line-height: 1; color: var(--ink); }
.tk-stat small { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.tk-stat.is-urgent > .ico, .tk-stat.is-urgent b { color: var(--coral); }
.tk-stat.tk-on { border-color: var(--teal); background: var(--teal-soft); }
.tk-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.tk-tabs { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.tk-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tk-search { flex: 1 1 220px; }
.tk-sel { flex: 0 1 220px; min-width: 150px; }
.tk-view { flex: none; }
.tk-view button { padding-left: 12px; padding-right: 12px; }
@media (min-width: 1000px) { .tk-bar { flex-direction: row; align-items: center; justify-content: space-between; } .tk-tools { flex: 1; justify-content: flex-end; } .tk-search { flex: 0 1 280px; } }
.tk-row { gap: 12px; align-items: center; }
.tk-row.is-done .row-title { color: var(--muted); }
.tk-row.is-overdue { box-shadow: inset 3px 0 0 var(--coral); }
.tk-right { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; flex: none; max-width: 52%; }
.tk-right .pill { display: inline-flex; align-items: center; gap: 4px; }
.tk-files { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.tk-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-strong, #C9CCDA); display: grid; place-items: center; flex: none; color: transparent; }
.tk-check.is-on, .tk-person.is-on .tk-check { background: var(--teal); border-color: var(--teal); color: #fff; }
.tk-selbar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg, 0 10px 30px rgba(27,33,89,.18)); }
.tk-selbar b { margin-right: 10px; }
.tk-selbar .link-btn { background: none; border: 0; color: var(--teal-strong); font-weight: 700; cursor: pointer; padding: 0; }
.tk-pad { padding: 10px 4px; }
.tk-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.tk-group { display: flex; flex-direction: column; gap: 8px; padding: 14px; text-align: left; color: var(--text); cursor: pointer; }
.tk-group-head { display: flex; align-items: baseline; gap: 8px; }
.tk-pct { font-family: var(--font-display); font-size: 22px; color: var(--ink); }
.tk-progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.tk-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--teal-strong)); }
.tk-group-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.tk-detail { display: flex; flex-direction: column; gap: 14px; }
.tk-detail-who { display: flex; align-items: center; gap: 12px; }
.tk-detail-who b, .tk-detail-who small { display: block; }
.tk-detail-who small { color: var(--muted); font-weight: 600; font-size: var(--fs-xs); }
.tk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.tk-facts > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tk-facts small { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.tk-facts .pill { align-self: flex-start; margin-top: 4px; }
.tk-details { white-space: pre-wrap; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: var(--fs-sm); }
.tk-addfile { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-addfile label.is-disabled { opacity: .5; pointer-events: none; }
.tk-form { display: flex; flex-direction: column; gap: 12px; }
.tk-datebtn { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.tk-ack { border: 1px solid var(--line); border-radius: 14px; }
.tk-pick-head { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.tk-pick-head b { color: var(--teal-strong); font-size: var(--fs-sm); }
.tk-pick-tools { display: flex; flex-direction: column; gap: 8px; }
.tk-pick-tools .chips { flex-wrap: wrap; }
.tk-pick { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; }
.tk-person { gap: 12px; cursor: pointer; }
.tk-person input { position: absolute; opacity: 0; pointer-events: none; }
.tk-person.is-on { background: var(--teal-soft); }
.tk-person[hidden] { display: none; }
.tk-newtitle { display: flex; gap: 8px; margin-top: 12px; }
.tk-newtitle .input { flex: 1; }
.tk-filelist .row-main { color: inherit; text-decoration: none; }
.tk-stats > .card { margin: 0; }
.tk-stat.tk-on { border-color: transparent; box-shadow: inset 0 0 0 2px var(--teal); }
@media (max-width: 600px) {
  .tk-stats { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .tk-stat { padding: 10px 8px; align-items: center; text-align: center; }
  .tk-stat > .ico { display: none; }
  .tk-stat b { font-size: 24px; }
  .tk-stat small { font-size: 10.5px; line-height: 1.2; }
  .tk-tabs { display: none; }
  .tk-search { flex-basis: 100%; }
  .tk-sel { flex: 1 1 0; min-width: 0; }
  .tk-tools [data-selmode] span { display: none; }
  .tk-row { flex-wrap: wrap; row-gap: 6px; }
  .tk-row .row-main { flex: 1 1 0; min-width: 0; }
  .tk-right { order: 3; max-width: none; width: 100%; padding-left: 52px; justify-content: flex-start; }
  .tk-list.is-selecting .tk-right { padding-left: 34px; }
  .tk-selbar { bottom: calc(var(--tabbar-h, 76px) + 10px); }
  .tk-selbar .btn span { display: none; }
  .tk-selbar [data-bulk="complete"] span { display: inline; }
}
.tk-detail .icon-btn:disabled, .sheet .tk-newtitle ~ * .icon-btn:disabled, .sheet .row .icon-btn:disabled { opacity: .35; }
.tk-groups > .card { margin: 0; }
.tk-selbar > .grow { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
@media (max-width: 600px) {
  .tk-selbar > .grow { flex-basis: 100%; }
  .tk-selbar [data-bulk="complete"] { flex: 1; }
}
