/* Task workspace uses the shared Kutvia brand tokens. */
.nav-item > svg { width: 20px; height: 20px; flex: 0 0 20px; }
.task-command, .icon-button, .task-segments button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.task-command svg, .icon-button svg, .task-segments svg { width: 17px; height: 17px; flex-shrink: 0; }
.task-command { width: auto; padding: 10px 16px; flex: none; font-size: 13px; }
.icon-button { width: 36px; height: 36px; min-width: 36px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; color: #526075; }
.icon-button:hover { background: #f1f5f9; color: var(--brand-primary); }
.task-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 8px 0 24px; }
.task-heading-meta { color: var(--muted); font-size: 10px; font-weight: 600; }
.task-heading h2 { display: flex; align-items: center; gap: 12px; font-size: 25px; margin-top: 4px; }
.task-total { color: var(--muted); font-size: 14px; font-weight: 500; }
.task-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.task-metric { padding: 18px 22px; background: none; text-align: left; border: 0; border-right: 1px solid var(--line); color: var(--ink); min-width: 0; }
.task-metric:last-child { border-right: 0; }
.task-metric > span { font-size: 12px; color: #526075; }
.task-metric > div { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.task-metric strong { font-size: 27px; font-weight: 600; }
.task-metric svg { width: 21px; height: 21px; color: #0891b2; }
.task-metric.tm-review svg { color: #b77908; }
.task-metric.tm-overdue svg { color: #dc2626; }
.task-metric.tm-done svg { color: #059669; }
.task-metric:hover, .task-metric[aria-pressed="true"] { background: #f0f5ff; }
.task-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.task-toolbar select { width: auto; max-width: 200px; min-width: 126px; min-height: 38px; border-radius: 6px; font-size: 12px; padding: 7px 26px 7px 10px; }
.task-search { position: relative; flex: 1 1 210px; min-width: 160px; }
.task-search > svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--muted); }
.task-search input { font-size: 12px; padding: 8px 10px 8px 35px; min-height: 38px; border-radius: 6px; }
.task-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 15px; font-size: 12px; color: var(--muted); }
.task-segments { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: #fff; }
.task-segments button { font-size: 11px; border: 0; border-radius: 4px; padding: 5px 11px; color: #66758a; background: transparent; min-width: 76px; height: 30px; }
.task-segments button[aria-pressed="true"] { background: #eaf1ff; color: #1d4ed8; }
#task-content { min-width: 0; }
.task-board { display: grid; grid-template-columns: repeat(5, minmax(196px, 1fr)); gap: 13px; overflow-x: auto; align-items: start; padding-bottom: 12px; }
.task-board.single-column { grid-template-columns: minmax(0, 520px); }
.task-column { min-width: 0; }
.task-column-heading { display: flex; align-items: center; gap: 8px; height: 38px; border-bottom: 2px solid #e1e6ed; margin-bottom: 12px; padding-bottom: 8px; }
.task-column-heading > span:not(.task-status) { font-size: 11px; color: var(--muted); }
.task-column-heading .icon-button { margin-left: auto; width: 25px; min-width: 25px; height: 25px; border: 0; background: transparent; }
.task-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #526075; white-space: nowrap; font-weight: 500; }
.task-status > span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.ts-in_progress > span { background: #2563eb; }
.ts-review > span { background: #d99c1d; }
.ts-blocked > span { background: #e05252; }
.ts-done > span { background: #059669; }
.task-column-items { display: grid; gap: 10px; }
.task-card { display: block; width: 100%; text-align: left; padding: 14px; border: 1px solid #dfe5ee; border-radius: 6px; background: #fff; color: var(--ink); min-width: 0; box-shadow: 0 1px 2px #20293605; }
.task-card:hover { border-color: #a4bbeb; background: #fcfdff; }
.task-card-top { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-bottom: 10px; }
.task-ref { font-size: 10px; font-weight: 500; color: #7c8798; white-space: nowrap; }
.task-priority { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: #6b778a; white-space: nowrap; }
.task-priority svg { width: 13px; height: 13px; }
.tp-high { color: #b77908; }
.tp-urgent { color: #c83140; }
.task-card-title { font-size: 13px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.task-card-project { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); margin: 11px 0 16px; min-width: 0; }
.task-card-project svg { width: 13px; height: 13px; flex-shrink: 0; color: #0891b2; }
.task-card-project > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.task-assignee { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; font-size: 10px; color: #526075; }
.task-assignee > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-avatar { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; min-width: 25px; font-size: 9px; font-weight: 600; border-radius: 50%; background: #e0f2fe; color: #0e7490; }
.task-deadline { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--muted); font-size: 10px; }
.task-deadline svg { width: 12px; height: 12px; }
.is-late { color: #c33141; }
.task-progress { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.task-progress > span { display: block; flex: 1; background: #eef1f5; height: 3px; border-radius: 2px; overflow: hidden; }
.task-progress > span > span { display: block; height: 100%; background: #0891b2; }
.task-progress small { font-size: 9px; color: var(--muted); }
.task-column-empty { border: 1px dashed #dce2eb; border-radius: 6px; padding: 25px 12px; text-align: center; font-size: 11px; color: #7c8798; }
.task-empty { padding: 65px 20px; text-align: center; border-top: 1px solid var(--line); }
.task-empty > svg { width: 30px; height: 30px; color: #8a9ab0; }
.task-empty h3 { font-size: 15px; margin: 14px 0 18px; font-weight: 500; }
.task-pagination { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 12px; }
.task-pagination > div { display: flex; gap: 6px; }
.task-table-scroll { overflow-x: auto; background: #fff; border-top: 1px solid var(--line); }
.task-table { width: 100%; border-collapse: collapse; min-width: 710px; }
.task-table th { text-align: left; padding: 13px 16px; font-size: 10px; color: var(--muted); font-weight: 500; background: #fafbfd; }
.task-table td { padding: 13px 16px; font-size: 12px; border-bottom: 1px solid var(--line); }
.task-title-link { display: grid; gap: 4px; text-align: left; border: 0; background: transparent; color: var(--ink); max-width: 420px; padding: 0; }
.task-title-link strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.task-title-link small { font-size: 10px; color: var(--muted); }
#task-dialog { width: min(940px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); border: 1px solid var(--line); padding: 0; color: var(--ink); background: #fff; overflow-y: auto; }
#task-dialog::backdrop { background: #14202e66; }
.task-dialog-header { display: flex; justify-content: space-between; gap: 18px; padding: 22px 26px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.task-dialog-header > div { min-width: 0; }
.task-dialog-header small { color: var(--muted); font-size: 10px; display: block; margin-bottom: 5px; overflow-wrap: anywhere; }
.task-dialog-header h2 { font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.task-dialog-body { padding: 22px 26px; }
.task-dialog-body label, .task-detail-aside label { display: block; font-size: 12px; font-weight: 500; margin: 16px 0 7px; }
.task-dialog-body > label:first-child { margin-top: 0; }
.task-dialog-body input, .task-dialog-body select, .task-dialog-body textarea, .task-detail-aside input, .task-detail-aside select { font-size: 13px; border-radius: 6px; }
.task-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.task-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.task-dialog-body .message { margin-top: 18px; }
.task-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 14px 26px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.task-detail-meta > span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.task-detail-meta svg, .task-delivery-link svg, .task-archive svg, [data-task-edit] svg { width: 14px; height: 14px; }
.task-detail-meta [data-task-edit] { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.task-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; }
.task-detail-main { padding: 24px 26px; min-width: 0; }
.task-detail-main > section + section { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; }
.task-detail-main h3 { font-size: 13px; font-weight: 600; margin: 0 0 14px; }
.task-detail-main h3 small { font-size: 11px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.task-description { white-space: pre-wrap; overflow-wrap: anywhere; color: #526075; font-size: 13px; line-height: 1.8; }
.task-checklist { display: grid; gap: 3px; }
.task-checklist label { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; margin: 0; padding: 8px 0; cursor: pointer; }
.task-checklist input { width: 16px; height: 16px; min-height: 16px; margin: 2px 0 0; flex: 0 0 16px; }
.task-checklist span { overflow-wrap: anywhere; min-width: 0; }
.task-checklist .is-checked span { text-decoration: line-through; color: var(--muted); }
.task-detail-aside { padding: 24px 20px; border-left: 1px solid var(--line); background: #fbfcfe; }
.task-person { display: flex; align-items: center; gap: 9px; }
.task-person small { display: block; font-size: 10px; color: var(--muted); }
.task-person strong { font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.task-details { font-size: 11px; line-height: 1.7; margin: 20px 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.task-details dt { color: var(--muted); margin-top: 8px; }
.task-details dd { margin: 0; overflow-wrap: anywhere; }
.task-detail-aside .task-command { width: 100%; margin-top: 15px; }
.task-delivery-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-primary); margin-top: 10px; font-size: 12px; }
.task-archive { display: flex; align-items: center; gap: 7px; margin-top: 22px; color: #7d8797; font-size: 12px; }
.task-events { max-height: 300px; overflow-y: auto; padding-right: 4px; margin-bottom: 18px; }
.task-event { padding: 12px 0; border-bottom: 1px solid #f0f2f6; }
.task-event > div { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; font-size: 10px; }
.task-event strong { font-weight: 600; }
.task-event time { color: var(--muted); }
.task-event p { font-size: 11px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px; }
.task-event.is-comment p { font-size: 12px; color: #39495f; }
#task-comment { font-size: 12px; min-height: 75px; }
#task-comment-form > button { margin-top: 9px; }
.task-detail-feedback { padding: 0 26px 20px; }
.task-detail-feedback:has(.message[hidden]) { padding-bottom: 0; }
.task-detail-feedback .text-button { margin: 10px 0; }
@media (max-width: 1150px) { .task-toolbar select { max-width: 170px; } .task-board { grid-template-columns: repeat(5, 210px); } }
@media (max-width: 580px) {
  .task-heading { margin-top: 5px; margin-bottom: 18px; gap: 8px; }
  .task-heading h2 { font-size: 22px; }
  .task-heading-meta { font-size: 8px; }
  .task-heading .task-command { font-size: 11px; padding: 8px 10px; }
  .task-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
  .task-metric { padding: 13px 15px; }
  .task-metric:nth-child(2) { border-right: 0; }
  .task-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .task-metric > span { font-size: 11px; }
  .task-metric strong { font-size: 24px; }
  .task-toolbar .task-search { flex-basis: 100%; }
  .task-toolbar select { flex: 1 1 calc(50% - 8px); max-width: none; min-width: 0; }
  .task-toolbar .icon-button { flex: 1 1 36px; }
  .task-board { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .task-board.single-column { grid-template-columns: minmax(0, 1fr); }
  .task-card { padding: 16px; }
  .task-card-title { font-size: 14px; }
  .task-card-project { font-size: 11px; }
  .task-assignee, .task-deadline { font-size: 11px; }
  .task-column-empty { padding: 14px; }
  #task-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 24px); }
  .task-dialog-header { padding: 18px; gap: 12px; }
  .task-dialog-header h2 { font-size: 18px; }
  .task-dialog-body { padding: 18px; }
  .task-form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .task-form-actions { flex-wrap: wrap; }
  .task-detail-meta { padding: 13px 18px; gap: 12px; }
  .task-detail-layout { grid-template-columns: minmax(0, 1fr); }
  .task-detail-main { padding: 20px 18px; }
  .task-detail-aside { border-left: 0; border-top: 1px solid var(--line); padding: 20px 18px; }
  .task-detail-feedback { padding-left: 18px; padding-right: 18px; }
}
