/* Delivery: tasks in plays, sprint headers and panel, measurement, Teamwork export. Uses tokens from app.css. */

.field.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.field.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.field.three > div, .field.four > div { display: grid; gap: 4px; min-width: 0; }
.field.three label, .field.four label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field.three input, .field.four input, .field.four select, #spStart, #spEnd { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); padding: 7px 9px; font-size: 13.5px; font-weight: 400; min-width: 0; }
.measure { gap: 8px; }
textarea.short { min-height: 54px; }

/* Metric progress */
.mprog { display: grid; gap: 4px; font-size: 13px; }
.mprog-track, .tbar-track { display: block; height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.mprog-track i, .tbar-track i { display: block; height: 100%; background: var(--bronze); border-radius: 3px; }
.mprog-track i.hit { background: var(--good); }
.mprog-track i.neg { background: var(--bad); width: 4% !important; }
.mline { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--bronze); white-space: nowrap; }
.mline.hit { color: var(--good); }

/* Play cards */
.tbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tblocked { color: var(--bad); font-weight: 600; }

/* Sprint column headers */
.kcol-head { display: grid; gap: 4px; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.kcol-dates { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kcol-goal { margin: 0; font-size: 12.5px; color: var(--ink); font-weight: 400; line-height: 1.4; }
.kcol-stats { font-size: 11.5px; color: var(--muted); }
.kcol-stats b { color: var(--bad); }
.kbtn { justify-self: start; font-size: 12px; padding: 4px 10px; margin-top: 2px; }
.live-dot { font-size: 9.5px; letter-spacing: 0.1em; background: var(--red); color: #FFFFFF; border-radius: 999px; padding: 1px 7px; margin-left: 8px; }
.kcol-h { align-items: center; }

/* Task lists */
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task { background: var(--sunk); border-radius: 8px; padding: 7px 9px; display: grid; gap: 4px; border-left: 3px solid var(--taupe); }
.task.s-doing { border-left-color: var(--bronze); }
.task.s-blocked { border-left-color: var(--bad); background: var(--bad-soft); }
.task.s-done { border-left-color: var(--good); opacity: 0.75; }
.task.s-done .ttitle, .task.s-done .ttitle-btn { text-decoration: line-through; text-decoration-color: var(--muted); }
.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.tasks.compact .task-row { grid-template-columns: auto minmax(0, 1fr); }
.tstatus { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 3px 6px; font-size: 12px; font-weight: 600; max-width: 96px; }
.ttitle { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 6px; font-size: 13.5px; font-weight: 600; width: 100%; min-width: 0; }
.ttitle:hover:not(:disabled), .ttitle:focus { border-color: var(--line); background: var(--surface); }
.ttitle-btn { font-weight: 600; font-size: 13.5px; text-decoration: none; overflow-wrap: anywhere; }
.ttitle-btn:hover { text-decoration: underline; }
.tmore { border: 0; background: transparent; color: var(--muted); width: 28px; height: 28px; border-radius: 6px; }
.tmore:hover { background: var(--surface); color: var(--ink); }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--muted); padding-left: 2px; }
.task-meta:empty { display: none; }
.tchip { font-weight: 600; color: var(--bronze); }
.tplay { font-style: italic; }
.overdue { color: var(--bad); font-weight: 600; }
.task-detail { display: grid; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 2px; }
.task-detail textarea { min-height: 60px; background: var(--surface); }
.task-tools { display: flex; align-items: center; gap: 6px; }
.task-tools [data-delwrap] { margin-left: auto; font-size: 12.5px; }
.task-tools .mv { width: 30px; height: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.task-tools .mv:disabled { opacity: 0.3; }
.tadd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.tadd input { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); padding: 8px 10px; font-size: 13.5px; min-width: 0; }

/* Sprint panel */
.sp-ctrl { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.seg-sm { grid-template-columns: repeat(3, auto); }
.seg-sm button { padding: 5px 12px; }
.tgroup { display: grid; gap: 6px; }
.tgroup h4 { margin: 6px 0 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; }
.tgroup h4 span { color: var(--taupe); }

/* Teamwork export */
#twPanel { border-top: 1px solid var(--line); padding-top: 10px; }
.tw { display: grid; gap: 8px; font-size: 13.5px; }
.tw p { margin: 0; }
.tw-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.tw-row select { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); padding: 5px 8px; margin-left: 6px; }

/* Report */
.rp-goal { font-size: 13.5px; }
.rp-tasks { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.rp-tasks th { text-align: left; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding: 4px 6px; }
.rp-tasks td { border-bottom: 1px solid var(--sunk); padding: 4px 6px; vertical-align: top; }
.rp-review { background: var(--bg); border-radius: 6px; padding: 10px 12px; display: grid; gap: 4px; }

@media (max-width: 760px) {
  .field.three, .field.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Section labels that sit directly in a section */
.sec > .flabel { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
