/* Task Manager only: keep shared calendar and modal styles unchanged. */
.task-workspace { min-width: 0; font-size: 13px; letter-spacing: 0; }
.task-view-bar, .task-views, .task-section-heading, .task-detail-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-view-bar { justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.task-views { gap: 6px; }
.task-views span { margin-left: 5px; opacity: .75; font-variant-numeric: tabular-nums; }
.task-workspace .task-filters { align-items: end; margin: 16px 0; gap: 12px; }
.task-filters > div { min-width: 120px; }
.task-table { table-layout: fixed; width: 100%; }
.task-table th:nth-child(1) { width: 27%; }
.task-table th:nth-child(2) { width: 16%; }
.task-table th:nth-child(3) { width: 12%; }
.task-table th:nth-child(4) { width: 10%; }
.task-table th:nth-child(5) { width: 22%; }
.task-table th:nth-child(6) { width: 13%; }
.task-table th, .task-table td { padding: 14px 10px; vertical-align: top; overflow-wrap: anywhere; white-space: normal; }
.task-table .task-overdue td:first-child { border-left: 3px solid var(--red); }
.task-title-link { display: block; border: 0; background: none; padding: 0; text-align: left; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; overflow-wrap: anywhere; }
.task-title-link:hover { text-decoration: underline; color: var(--blue); }
.task-title-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.task-muted { color: var(--text2); font-size: 12px; overflow-wrap: anywhere; }
.task-late { color: var(--red); font-weight: 600; }
.task-workspace progress { display: block; width: 100%; max-width: 170px; height: 6px; margin: 7px 0; accent-color: var(--green); }
.task-detail { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; }
.task-main { grid-column: 1; grid-row: 1; min-width: 0; }
.task-properties { grid-column: 2; grid-row: 1; border-left: 1px solid var(--border); padding-left: 22px; overflow-wrap: anywhere; }
.task-properties .form-label:not(:first-child), .task-properties h3 { margin-top: 20px; }
.task-workspace h3 { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 8px; letter-spacing: 0; }
.task-detail-header { justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.task-detail-header h2 { font-size: 21px; line-height: 1.35; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; letter-spacing: 0; }
.task-prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.task-description, .task-meta-editor { padding-bottom: 22px; }
.task-description h3:not(:first-child) { margin-top: 18px; }
.task-meta-editor textarea { min-height: 100px; }
.task-milestones, .task-conversation { border-top: 1px solid var(--border); padding: 18px 0; }
.task-section-heading { margin: 8px 0; }
.task-section-heading h3 { margin: 0; }
.task-section-heading .task-muted { margin-right: auto; }
.task-milestone { display: grid; grid-template-columns: 18px minmax(0,1fr) minmax(70px,110px) 85px auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.task-milestone input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
.task-subitem { padding-left: 26px; }
.task-milestone-title { overflow-wrap: anywhere; }
.task-finished { text-decoration: line-through; color: var(--text3); }
.task-item-actions { display: flex; gap: 4px; }
.task-action-menu { position: relative; }
.task-action-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 4px; font-size: 22px; }
.task-action-menu summary::-webkit-details-marker { display: none; }
.task-action-menu summary:hover { background: var(--surface2); }
.task-action-menu > div { position: absolute; right: 0; top: 32px; z-index: 10; width: 165px; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 6px; padding: 4px; box-shadow: 0 4px 16px #0002; }
.task-action-menu button { display: block; width: 100%; background: none; border: 0; padding: 9px; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.task-action-menu button:hover { background: var(--surface2); }
.task-action-menu button.task-late { color: var(--red); }
.task-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.task-reply { padding: 12px 0; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.task-reply .task-muted { margin-bottom: 6px; }
.task-reply-actions { justify-content: flex-end; margin-top: 10px; }
.task-conversation textarea { min-height: 100px; }
.task-activity { list-style: none; padding: 0; }
.task-activity li { padding: 12px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .task-detail { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .task-properties { grid-column: 1; grid-row: 1; border-left: 0; padding: 0 0 18px; border-bottom: 1px solid var(--border); }
  .task-main { grid-row: 2; }
  .task-table thead { display: none; }
  .task-table, .task-table tbody, .task-table tr, .task-table td { display: block; width: auto; }
  .task-table tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .task-table td { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 4px 10px; border: 0; padding: 5px 8px; }
  .task-table td::before { content: attr(data-label); color: var(--text2); font-size: 12px; grid-column: 1; grid-row: 1 / span 5; }
  .task-table td > * { grid-column: 2; min-width: 0; }
  .task-table .badge { justify-self: start; }
}
@media (max-width: 540px) {
  .task-workspace .task-filters > div { min-width: 0 !important; width: 100%; flex: auto !important; }
  .task-views .btn { white-space: normal; }
  .task-milestone { grid-template-columns: 18px minmax(0,1fr) auto; gap: 6px 8px; }
  .task-milestone-title { grid-column: 2; }
  .task-milestone-assignee { grid-column: 2; }
  .task-milestone time { grid-column: 2; }
  .task-item-actions { grid-column: 3; grid-row: 1 / span 3; }
  .task-subitem { padding-left: 16px; }
}
