/* Task details (TaskDetails.jsx): /tasks/task/<task_id> */
.td2 { display: flex; flex-direction: column; gap: 14px; }
.td2-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--hk-muted); }
.td2-crumbs b { color: var(--hk-ink); font-weight: 600; }
.td2-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 2px 0; color: var(--hk-teal); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.td2-back:hover { text-decoration: underline; }

.td2-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.td2-head h1 { flex: 1 1 240px; min-width: 0; margin: 0; font-size: 26px; font-weight: 700; color: var(--hk-ink); line-height: 1.2; overflow-wrap: anywhere; }
.td2-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.td2-pending { background: var(--hk-amber); color: #8a5a12; font-weight: 600; font-size: 13px; padding: 7px 12px; border-radius: 8px; white-space: nowrap; }
.td2-tile { flex: none; width: 60px; height: 60px; border-radius: 12px; background: var(--hk-mint); color: var(--hk-teal); display: inline-flex; align-items: center; justify-content: center; }
.td2-tile--sm { width: 52px; height: 52px; border-radius: 11px; }

.td2-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.td2-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 1000px) { .td2-grid { grid-template-columns: 1fr; } }

.td2-card { display: flex; flex-direction: column; gap: 10px; }
.td2-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 650; color: var(--hk-ink); }
.td2-title svg { color: var(--hk-ink); flex: none; }
.td2-title--lg { font-size: 19px; }
.td2-text { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--hk-ink); white-space: pre-wrap; }
.td2-sub { margin: -4px 0 0; font-size: 13.5px; color: var(--hk-muted); }
.td2-muted { color: var(--hk-muted); font-weight: 400; }

/* Task summary: helper, routine, occurrence, status */
.td2-summary { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.td2-summary > div { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; align-items: center; padding: 12px 14px 12px 0; }
.td2-summary > div > svg { grid-row: span 2; color: var(--hk-ink); }
.td2-summary > div:nth-child(odd) { border-right: 1px solid var(--hk-line); }
.td2-summary > div:nth-child(even) { padding-left: 18px; }
.td2-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--hk-line); }
.td2-summary dt { font-size: 12.5px; color: var(--hk-muted); }
.td2-summary dd { margin: 2px 0 0; font-size: 15px; font-weight: 650; color: var(--hk-ink); overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .td2-summary { grid-template-columns: 1fr; }
  .td2-summary > div:nth-child(odd) { border-right: 0; }
  .td2-summary > div:nth-child(even) { padding-left: 0; }
  .td2-summary > div:not(:last-child) { border-bottom: 1px solid var(--hk-line); }
}

.td2-checklist { list-style: none; margin: 0; padding: 0 0 0 34px; }
.td2-checklist li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 14.5px; color: var(--hk-ink); }
.td2-checklist li + li { border-top: 1px solid var(--hk-line); }
.td2-tick { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid #b9c7bf; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.td2-tick--on { background: var(--hk-teal); border-color: var(--hk-teal); }
.td2-files { padding-left: 34px; }
.td2-files .tk-file { width: 120px; height: 96px; }

.td2-audit { width: 100%; border-collapse: collapse; font-size: 14px; }
.td2-audit th, .td2-audit td { text-align: left; padding: 9px 12px; border: 1px solid var(--hk-line); vertical-align: top; }
.td2-audit th { width: 38%; background: #f7f9f7; font-weight: 600; color: var(--hk-ink); }
.td2-audit td { color: var(--hk-ink); }

/* Feedback list */
.td2-fb { border: 1px solid var(--hk-line); border-radius: 11px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.td2-fb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.td2-cat { display: inline-flex; align-items: center; gap: 7px; background: var(--hk-mint); color: var(--hk-teal); font-weight: 600; font-size: 13.5px; padding: 5px 11px; border-radius: 8px; }
.td2-fb-status { font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 8px; }
.td2-fb-status--wait { background: var(--hk-amber); color: #8a5a12; }
.td2-fb-status--read { background: #e6f3ec; color: #2f6b47; }
.td2-fb-line { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--hk-ink); }
.td2-fb-line svg { color: var(--hk-muted); }
.td2-fb-msg { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--hk-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.td2-fb-decide { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; margin-top: 2px; font: inherit; font-size: 14px; font-weight: 600; color: var(--hk-teal); text-decoration: underline; cursor: pointer; }
.td2-fb-future { font-size: 13px; font-weight: 600; color: var(--hk-teal); }
.td2-photo { width: 140px; height: 100px; padding: 0; border: 1px solid var(--hk-line); border-radius: 9px; background: #eef2f0; color: var(--hk-muted); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; cursor: zoom-in; }
.td2-photo:disabled { cursor: default; }
.td2-photo img { width: 100%; height: 100%; object-fit: cover; }
.td2-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--hk-muted); font-size: 14px; }
.td2-empty p { margin: 0; }
.td2-note { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--hk-muted); }
.td2-note svg { flex: none; }
.td2-note--foot { border-top: 1px solid var(--hk-line); padding-top: 12px; margin-top: 4px; }

/* Add feedback */
.td2-form { gap: 12px; }
.td2-card-head { display: flex; align-items: flex-start; gap: 12px; }
.td2-card-head h3 { margin: 0; font-size: 19px; font-weight: 700; color: var(--hk-ink); }
.td2-card-head p { margin: 3px 0 0; font-size: 13.5px; color: var(--hk-muted); }
.td2-head-icon { color: var(--hk-ink); display: inline-flex; padding-top: 2px; }
.td2-label { font-size: 14px; font-weight: 650; color: var(--hk-ink); }
.td2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.td2-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d4e0d8; background: #fff; color: var(--hk-ink); font: inherit; font-size: 13.5px; font-weight: 500; padding: 7px 13px; border-radius: 8px; cursor: pointer; }
.td2-chip:hover:not(:disabled) { border-color: var(--hk-teal); }
.td2-chip--on { background: var(--hk-teal); border-color: var(--hk-teal); color: #fff; font-weight: 600; }
.td2-textarea { width: 100%; min-height: 104px; resize: vertical; border: 1px solid #cfdad3; border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 14.5px; line-height: 1.45; color: var(--hk-ink); background: #fff; box-sizing: border-box; }
.td2-textarea:focus { outline: none; border-color: var(--hk-teal); box-shadow: 0 0 0 3px rgba(18,92,88,.12); }
.td2-photo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.td2-photo-btn { color: var(--hk-ink); }
.td2-thumb { position: relative; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; border: 1px solid var(--hk-line); }
.td2-thumb img { width: 100%; height: 100%; object-fit: cover; }
.td2-thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.td2-form-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--hk-line); padding-top: 14px; }

/* Update future tasks too? */
.td2-future { max-width: 600px; gap: 16px; }
.td2-future-head { display: flex; align-items: center; gap: 14px; }
.td2-future-head h2 { flex: 1; margin: 0; font-size: 22px; font-weight: 700; color: var(--hk-ink); }
.td2-future-text { margin: 0; font-size: 15px; line-height: 1.45; color: var(--hk-ink); }
.td2-future-task { display: flex; align-items: center; gap: 14px; border: 1px solid var(--hk-line); border-radius: 11px; padding: 14px; }
.td2-future-task > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-left: 14px; border-left: 1px solid var(--hk-line); }
.td2-future-task b { font-size: 16px; color: var(--hk-ink); }
.td2-future-task span { font-size: 14px; color: var(--hk-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.td2-future-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.td2-future-actions .hk-btn { min-height: 46px; font-size: 14.5px; white-space: normal; }
.td2-future-note { margin: 0; text-align: center; font-size: 13px; color: var(--hk-muted); }
@media (max-width: 480px) { .td2-future-actions { grid-template-columns: 1fr; } }

/* Task history cards and Today rows open Task details */
.tk-panel--link { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tk-panel--link:hover { border-color: #c4d4ca; box-shadow: 0 2px 10px rgba(16,62,61,.06); }
.tk-open { font-size: 12px; margin-left: 4px; }
.td-task--link { cursor: pointer; }
.td-task--link:hover h4 { text-decoration: underline; }

/* Reassign task */
.td2-reassign { max-width: 520px; gap: 12px; }
.td2-reassign-note { margin: 0; }
.td2-helpers { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.td2-helper { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--hk-line); border-radius: 10px; background: #fff; padding: 10px 12px; font: inherit; cursor: pointer; }
.td2-helper:hover:not(:disabled) { border-color: #c4d4ca; }
.td2-helper:disabled { opacity: .55; cursor: not-allowed; }
.td2-helper--on { border-color: var(--hk-teal); box-shadow: 0 0 0 1px var(--hk-teal); }
.td2-helper-photo { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; font-size: 13px; font-weight: 600; line-height: 1; }
.td2-helper-photo img { width: 100%; height: 100%; object-fit: cover; }
.td2-helper-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.td2-helper-text b { font-size: 14.5px; color: var(--hk-ink); font-weight: 600; overflow-wrap: anywhere; }
.td2-helper-text small { font-size: 12.5px; color: var(--hk-teal); font-weight: 600; }
.td2-radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #b9c7bf; }
.td2-radio--on { border: 5px solid var(--hk-teal); }
