/* Task details: one continuous dialog, with distinct editing and progress areas. */
.task-assignment {
  --task-progress-color: #b74755;
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 100px #0c213d38;
  overflow: auto;
  animation: task-dialog-enter .18s ease-out;
}
.task-assignment::backdrop { background: #0d20365c; backdrop-filter: blur(4px); }
.task-assignment[data-progress="50"] { --task-progress-color: #956807; }
.task-assignment[data-progress="75"] { --task-progress-color: #4278d7; }
.task-assignment[data-progress="100"] { --task-progress-color: #298662; }
.task-assignment .task-dialog-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, var(--accent-soft), var(--surface) 70%);
}
.task-dialog-mark {
  display: grid; place-items: center; flex: 0 0 46px; height: 46px;
  color: var(--accent); background: var(--surface); border: 1px solid var(--line);
  border-radius: 13px; box-shadow: 0 4px 12px #17365b08;
}
.task-dialog-mark svg { width: 26px; height: 26px; }
.task-dialog-heading { flex: 1; min-width: 0; }
.task-dialog-eyebrow { color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .1em; margin-bottom: 4px; }
.task-assignment .task-dialog-heading h2 { font-size: 23px; letter-spacing: -.035em; line-height: 1.2; margin: 0; }
.task-assignment .task-form-meta { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.task-assignment .task-state-badge {
  border: 1px solid var(--line); border-radius: 20px; padding: 6px 10px;
  font-size: 11px; font-weight: 650; white-space: nowrap; color: var(--muted); background: var(--surface);
}
.task-state-badge::before { content: ''; display: inline-block; width: 6px; height: 6px; background: currentColor; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.task-assignment[data-status="On Hold"] .task-state-badge { background: #fcf2df; border-color: #f1deb6; color: #825600; }
.task-assignment[data-status="In Progress"] .task-state-badge { background: #edf3ff; border-color: #d2def5; color: #345eb1; }
.task-assignment[data-status="Completed"] .task-state-badge { background: #eaf6ee; border-color: #c9e4d3; color: #276c49; }
.task-assignment .task-close-button[aria-label] {
  display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px;
  padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted);
}
.task-close-button svg { width: 18px; height: 18px; }
.task-assignment .task-close-button:hover { background: var(--surface); border-color: var(--line); }
.task-dialog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; }
.task-detail-column { min-width: 0; padding: 20px 24px; }
.task-assignment .task-delivery-panel {
  min-width: 0; padding: 20px 22px; border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 72%, var(--surface));
}
.task-assignment .field { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.task-assignment .field > label { display: block; margin: 0; font-size: 11px; font-weight: 650; line-height: 16px; color: var(--muted); }
.task-assignment :is(input, select, textarea) {
  width: 100%; min-width: 0; box-sizing: border-box;
  height: 40px; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 7px;
  font: inherit; font-size: 13px; line-height: 20px;
  background: var(--surface); color: var(--ink); box-shadow: none;
}
.task-assignment :is(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); box-shadow: none; }
.task-assignment :is(input, select, textarea):disabled { opacity: 1; cursor: default; background: color-mix(in srgb, var(--canvas) 38%, var(--surface)); color: var(--ink); -webkit-text-fill-color: var(--ink); }
.task-assignment select:disabled { appearance: none; }
.task-assignment textarea { height: 60px; min-height: 60px; resize: vertical; }
.task-assignment textarea::placeholder { color: var(--muted); opacity: .8; font-size: 12px; }
.task-overview-section { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 14px; }
.task-overview-section .task-form-wide { grid-column: 1 / -1; }
.task-assignment .task-name-field input { font-size: 15px; font-weight: 650; }
.task-assignment .task-section-title { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; font-size: 12px; letter-spacing: 0; line-height: 18px; font-weight: 700; color: var(--ink); }
.task-section-title svg { width: 17px; height: 17px; color: var(--accent); }
.task-people-section { margin-top: 18px; }
.task-people-list { display: grid; gap: 8px; }
.task-assignment .task-person-field { display: grid; grid-template-columns: 96px 30px minmax(0, 1fr); align-items: center; gap: 8px; }
.task-person-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 750; }
.task-assignment .task-person-field select { height: 36px; min-height: 36px; }
.task-assignment .task-person-field select:disabled { background: transparent; border-color: transparent; padding-left: 0; }
.task-notes-section { margin-top: 18px; }
.task-notes-section textarea { min-height: 66px; height: 66px; }
.task-dependency-details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.task-dependency-details summary { display: flex; align-items: center; gap: 8px; list-style: none; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.task-dependency-details summary::-webkit-details-marker { display: none; }
.task-dependency-details summary span { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 5px; background: var(--canvas); font-size: 10px; }
.task-dependency-details summary svg { width: 12px; height: 12px; margin-left: auto; transition: transform .15s; }
.task-dependency-details[open] summary svg { transform: rotate(90deg); }
.task-dependency-details > div { padding-top: 10px; }
.task-assignment .task-dependency-details select[multiple] { height: 72px; min-height: 72px; }
.task-dependency-details p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.task-progress-overview { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.task-progress-overview > div:last-child { display: grid; gap: 5px; }
.task-progress-overview > div:last-child > strong { color: var(--ink); font-size: 12px; font-weight: 650; }
.task-progress-overview small { font-size: 11px; color: var(--muted); }
.task-progress-ring { --task-complete: 0%; position: relative; display: grid; place-items: center; flex: 0 0 86px; height: 86px; border-radius: 50%; background: conic-gradient(var(--task-progress-color) var(--task-complete), var(--line) 0); }
.task-progress-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.task-progress-ring strong { position: relative; font-size: 22px; font-weight: 750; letter-spacing: -.05em; color: var(--ink); }
.task-completion-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.task-completion-choices button { min-height: 36px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; font-weight: 650; background: var(--surface); color: var(--muted); transition: background .15s, transform .15s; }
.task-completion-choices button[aria-pressed="true"] { color: white; background: var(--task-progress-color); border-color: var(--task-progress-color); }
.task-completion-choices button:not(:disabled):hover { transform: translateY(-1px); border-color: var(--task-progress-color); }
.task-completion-choices button:disabled { opacity: 1; cursor: default; }
.task-assignment .task-progress-section > .field + .field { margin-top: 14px; }
.task-schedule-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }
.task-date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.task-assignment .task-date-fields input { padding: 8px 6px; font-size: 12px; }
.task-assignment .task-priority-field { margin-top: 14px; }
.task-assignment .task-access-note { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 11px; line-height: 1.5; padding-top: 16px; margin: 0; }
.task-access-note svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 2px; }
.task-assignment .task-dialog-footer { position: sticky; bottom: 0; z-index: 1; display: flex; gap: 9px; margin: 0; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.task-form-hint { margin-right: auto; color: var(--muted); font-size: 11px; }
.task-dialog-footer .dash-button { min-height: 38px; padding: 8px 16px; font-size: 12px; border-radius: 8px; }
.task-dialog-footer .accent-button { display: inline-flex; align-items: center; gap: 7px; }
.task-dialog-footer svg { width: 16px; height: 16px; }
.task-assignment .form-alert { margin: 0 24px 14px; }
[data-theme="dark"] .task-assignment[data-status="On Hold"] .task-state-badge { color: #f1cf8a; background: #473a24; border-color: #665235; }
[data-theme="dark"] .task-assignment[data-status="In Progress"] .task-state-badge { color: #bbd3ff; background: #233a60; border-color: #385788; }
[data-theme="dark"] .task-assignment[data-status="Completed"] .task-state-badge { color: #a7dfbe; background: #234437; border-color: #39624c; }
@keyframes task-dialog-enter { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 850px) {
  .task-dialog-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .task-detail-column { padding: 18px; }
  .task-assignment .task-delivery-panel { padding: 18px; }
  .task-overview-section { grid-template-columns: 1fr; }
  .task-assignment .task-person-field { grid-template-columns: 82px 26px minmax(0, 1fr); gap: 5px; }
}
@media (max-width: 650px) {
  .task-assignment { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 0; border-radius: 14px; }
  .task-assignment .task-dialog-header { gap: 10px; padding: 16px; flex-wrap: wrap; }
  .task-dialog-mark { flex-basis: 38px; height: 38px; border-radius: 10px; }
  .task-assignment .task-dialog-heading h2 { font-size: 20px; }
  .task-assignment .task-state-badge { order: 5; margin-left: 48px; }
  .task-form-meta > span { display: none; }
  .task-dialog-layout { grid-template-columns: 1fr; }
  .task-detail-column { padding: 16px; }
  .task-assignment .task-delivery-panel { border-left: 0; border-top: 1px solid var(--line); padding: 16px; }
  .task-assignment .task-person-field { grid-template-columns: 82px 26px minmax(0, 1fr); }
  .task-assignment .task-dialog-footer { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) { .task-assignment { animation: none; } .task-assignment * { transition: none!important; } }
