.tasks-module { gap: 14px; }
.tasks-module .tasks-hero { align-items: center; border-bottom: 4px solid #ef6c00; min-height: 108px; margin: 0; padding: 20px 24px; }
.tasks-module .tasks-hero h1 { font: 700 clamp(1.7rem, 2.5vw, 2.4rem)/1.1 Inter, system-ui, sans-serif; margin: 3px 0; }
.tasks-module .tasks-hero button.primary, .task-collaboration-dialog footer button.primary { border: 1px solid #17658b; border-radius: 6px; background: #17658b; color: #fff; padding: 8px 13px; font-weight: 800; cursor: pointer; }
.tasks-module .tasks-hero button.primary:hover, .task-collaboration-dialog footer button.primary:hover { background: #104c6b; }
.forge-task-board { border: 1px solid #d6e1e8; border-radius: 12px; background: #fff; overflow: hidden; }
.forge-task-board-tools { align-items: end; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 15px; border-bottom: 1px solid #dce5eb; }
.forge-task-board-tools > label { display: grid; gap: 3px; flex: 1; min-width: 230px; font-size: .82rem; font-weight: 750; }
.forge-task-board-tools input, .forge-task-board-tools select { width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid #b9cbd7; border-radius: 6px; background: #fff; color: #112c42; font: inherit; }
.forge-task-board-tools > details { position: relative; }
.forge-task-board-tools > details > summary, .forge-task-board-tools > button { min-height: 36px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #9bb4c3; border-radius: 6px; padding: 6px 11px; background: #fff; color: #154966; font-weight: 750; cursor: pointer; }
.forge-task-board-tools > details[open] { border: 1px solid #c7d9e3; border-radius: 7px; padding: 8px; background: #f5f9fb; }
.forge-task-board-tools > details[open] > summary { margin-bottom: 8px; }
.forge-task-board-tools > details label { display: inline-grid; gap: 3px; margin-right: 8px; font-size: .8rem; }
.forge-task-board-tools > button.active { background: #143f5b; color: #fff; }
.forge-task-board-tools > button span { border-radius: 99px; background: #e9f1f5; color: #143f5b; padding: 1px 6px; }
.forge-task-owners { display: flex; gap: 6px; overflow-x: auto; padding: 10px 15px; border-bottom: 1px solid #dce5eb; scrollbar-width: thin; }
.forge-task-owners button { flex: 0 0 auto; display: inline-flex; gap: 7px; align-items: center; min-height: 32px; border: 1px solid #c6d7e0; border-radius: 999px; padding: 5px 10px; background: #fff; color: #314f64; font-weight: 750; cursor: pointer; }
.forge-task-owners button.active { background: #143f5b; color: #fff; border-color: #143f5b; }
.forge-task-owners span { opacity: .75; }
.forge-task-kanban { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; background: #f4f7f9; }
.forge-task-kanban:has([data-task-lane="complete"]:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.forge-task-lane { min-width: 0; min-height: 220px; border-radius: 9px; padding: 10px; background: #e9f0f4; }
.forge-task-lane[hidden], .forge-task-card[hidden], .task-table tr[hidden] { display: none !important; }
.forge-task-lane > header { height: auto; padding: 0 2px 8px; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; }
.forge-task-lane > header strong { font-size: .9rem; }
.forge-task-lane > header span { background: #d3e1e9; border-radius: 99px; padding: 2px 8px; font-size: .76rem; font-weight: 800; }
.forge-task-lane-empty { margin: 10px 2px; color: #698094; font-size: .83rem; }
.forge-task-card { width: 100%; display: grid; gap: 5px; text-align: left; margin-bottom: 8px; padding: 11px 12px; border: 1px solid #d5e1e8; border-radius: 8px; background: #fff; color: #10283e; cursor: pointer; }
.forge-task-card:hover, .forge-task-card:focus-visible { border-color: #1371a1; box-shadow: 0 2px 9px #153d5c17; }
.forge-task-card.is-overdue { border-left: 3px solid #c45b42; }
.forge-task-card > strong { font-size: .93rem; line-height: 1.3; }
.forge-task-card > small { color: #607688; line-height: 1.3; }
.forge-task-card-top { display: flex; justify-content: space-between; gap: 5px; }
.forge-task-card em { font-style: normal; }
.forge-task-card-date { font-size: .78rem; font-weight: 750; }
.forge-task-list { border: 1px solid #d6e1e8; border-radius: 10px; background: #fff; }
.forge-task-list > summary { cursor: pointer; padding: 12px 15px; color: #164760; font-weight: 800; }
.task-date-shortcuts { display: flex; flex-wrap: wrap; gap: 4px; }
.task-date-shortcuts button { border: 1px solid #bfd0d9; border-radius: 5px; background: #fff; color: #23516b; min-height: 30px; padding: 4px 6px; font-size: .72rem; white-space: nowrap; cursor: pointer; }
.task-collaboration-dialog { position: fixed; inset: max(8px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom)); width: min(760px, calc(100vw - 24px)); height: fit-content; max-height: calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom))); margin: auto; overflow: hidden; }
.task-collaboration-dialog form { display: flex; flex-direction: column; max-height: inherit; padding: 0 18px; overflow: hidden; }
.task-collaboration-dialog form > header { flex: none; flex-direction: row; min-height: 46px; height: auto; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid #dce5eb; }
.task-dialog-body { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.task-collaboration-dialog form > header h2 { flex: 1 1 auto; min-width: 0; margin: 0; color: #10283e; font: 750 1.2rem/1.2 Inter, system-ui, sans-serif; }
.task-collaboration-dialog form > header > .task-dialog-close { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid #c9d7e0; border-radius: 50%; background: #f3f7f9; color: #38546a; cursor: pointer; }
.task-collaboration-dialog form > header > .task-dialog-close:hover { background: #e7f0f5; color: #10283e; }
.task-collaboration-dialog form > header > .task-dialog-close:focus-visible { outline: 2px solid #17658b; outline-offset: 2px; }
.task-quick-entry { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px 10px; margin: 0 0 7px; }
.task-quick-entry > label { display: grid; min-width: 0; gap: 3px; color: #52677a; font-size: .78rem; font-weight: 750; }
.task-quick-entry input, .task-quick-entry select { min-width: 0; min-height: 34px; height: 34px; padding: 5px 9px; border-radius: 6px; font-size: .88rem; }
.task-quick-entry .task-field-title { grid-column: span 12; }
.task-quick-entry .task-field-owner, .task-quick-entry .task-field-due { grid-column: span 4; }
.task-quick-entry .task-field-priority, .task-quick-entry .task-field-status { grid-column: span 2; }
.task-quick-entry.has-organization .task-field-organization, .task-quick-entry.has-organization .task-field-owner, .task-quick-entry.has-organization .task-field-due { grid-column: span 6; }
.task-quick-entry.has-organization .task-field-priority, .task-quick-entry.has-organization .task-field-status { grid-column: span 3; }
.task-due-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; }
.task-due-controls > input { flex: 1 1 135px; width: auto; }
.task-handoff-builder { border-top: 1px solid #dce5ea; margin-top: 12px; padding-top: 12px; }
.task-handoff-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-handoff-head button, .task-handoff-row button, [data-pass-task] { border: 1px solid #aac3d1; border-radius: 6px; background: #eef6fa; color: #174965; padding: 6px 9px; font-weight: 750; cursor: pointer; }
.task-handoff-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; margin-top: 7px; }
.task-handoff-row select { min-width: 0; width: 100%; padding: 7px; border: 1px solid #bdcdd7; border-radius: 6px; }
.task-collaboration-dialog .task-detail-section { margin: 4px 0; padding: 7px 10px; border-radius: 7px; }
.task-collaboration-dialog .task-detail-section > summary { font-size: .85rem; line-height: 1.3; }
.task-collaboration-dialog .task-detail-section .contact-form-grid { gap: 8px; margin: 9px 0 2px; }
.task-collaboration-dialog .task-chat-panel { gap: 7px; margin: 7px 0; padding: 10px 12px; }
.task-collaboration-dialog .task-message-list { min-height: 38px; max-height: min(130px, 21dvh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.task-collaboration-dialog .task-chat-panel > label { display: grid; gap: 3px; font-size: .78rem; font-weight: 750; }
.task-collaboration-dialog .task-chat-panel textarea { box-sizing: border-box; width: 100%; height: 54px; min-height: 54px; max-height: 100px; padding: 7px 9px; resize: vertical; font: inherit; font-size: .85rem; }
.task-collaboration-dialog .task-chat-panel > button { padding: 6px 11px; font-size: .82rem; }
.task-collaboration-dialog footer { flex: none; min-height: 44px; gap: 8px; padding: 7px 0 9px; border-top: 1px solid #dce5eb; background: #fff; }
.task-collaboration-dialog footer button:not(.primary) { border: 1px solid #a9c1cf; border-radius: 6px; background: #edf5f9; color: #174965; padding: 6px 10px; font-size: .82rem; font-weight: 750; cursor: pointer; }
.task-collaboration-dialog footer .task-delete-button { border-color: #d7aaa2 !important; background: #fff6f4 !important; color: #a33d2e !important; }
.task-collaboration-dialog footer button.primary { margin-left: auto; padding: 7px 12px; font-size: .82rem; }
.forge-recently-deleted-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.forge-recently-deleted-head h1 { margin: 0; font: 750 1.4rem/1.2 Inter, system-ui, sans-serif; }
.forge-recently-deleted-head span { color: #607688; font-size: .82rem; }
.forge-recently-deleted-search { display: grid; gap: 4px; max-width: 360px; margin-bottom: 12px; color: #52677a; font-size: .8rem; font-weight: 750; }
.forge-recently-deleted-search input { min-height: 36px; padding: 6px 9px; border: 1px solid #bfd0d9; border-radius: 6px; background: #fff; color: #10283e; font: inherit; }
.recently-deleted-tasks tr[hidden] { display: none; }
.task-restore-button { border: 1px solid #17658b; border-radius: 6px; background: #17658b; color: #fff; padding: 6px 10px; font-size: .82rem; font-weight: 750; cursor: pointer; }
.task-restore-button:disabled { opacity: .5; cursor: wait; }
@media (max-width: 760px) {
  .tasks-module, .forge-task-board, .forge-task-kanban, .forge-task-lane, .forge-task-card { min-width: 0; max-width: 100%; }
  .forge-task-card > strong, .forge-task-card > small { overflow-wrap: anywhere; }
  .forge-task-kanban, .forge-task-kanban:has([data-task-lane="complete"]:not([hidden])) { grid-template-columns: 1fr; }
  .forge-task-lane { min-height: 100px; }
  .task-handoff-row { grid-template-columns: 24px minmax(0, 1fr); }
  .task-handoff-row button { grid-column: 2; justify-self: start; }
  .task-collaboration-dialog { width: calc(100vw - 16px); max-width: none; border-radius: 12px; }
  .task-collaboration-dialog form { padding: 0 12px; }
  .task-collaboration-dialog form > header h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .task-collaboration-dialog .task-dialog-body :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 16px; }
  .task-collaboration-dialog footer { flex-wrap: wrap; justify-content: flex-start; padding-bottom: 9px; }
  .task-collaboration-dialog footer button { min-height: 40px; }
}
@media (max-width: 700px) {
  .task-quick-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-quick-entry .task-field-title, .task-quick-entry .task-field-due { grid-column: 1 / -1; }
  .task-quick-entry .task-field-organization, .task-quick-entry .task-field-owner, .task-quick-entry .task-field-priority, .task-quick-entry .task-field-status,
  .task-quick-entry.has-organization .task-field-organization, .task-quick-entry.has-organization .task-field-owner, .task-quick-entry.has-organization .task-field-priority, .task-quick-entry.has-organization .task-field-status { grid-column: span 1; }
  .task-quick-entry.has-organization .task-field-due { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .task-collaboration-dialog form { padding-right: 12px; padding-left: 12px; }
  .task-quick-entry .task-field-organization, .task-quick-entry .task-field-owner,
  .task-quick-entry.has-organization .task-field-organization, .task-quick-entry.has-organization .task-field-owner { grid-column: 1 / -1; }
}
