/* Task-only overrides; shared collaboration styles belong to the chat module. */
#team-tasks .tasks-kanban{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(230px,1fr);align-items:stretch;gap:12px;padding:12px;overflow-x:auto;scrollbar-gutter:stable;scrollbar-width:thin}
#team-tasks .task-column{min-width:0;min-height:240px;border:1px solid var(--line);border-radius:12px;background:var(--collab-soft,var(--panel));padding:0 0 8px}
#team-tasks .task-column>h3{margin:0;padding:12px;font-size:13px;line-height:1.45;display:flex;align-items:center;justify-content:space-between;gap:8px}
#team-tasks .task-column>h3 span{font-variant-numeric:tabular-nums;color:var(--muted)}
#team-tasks .task-column .task-tiles{display:flex;flex-direction:column;gap:10px;padding:0 9px 8px}
#team-tasks .task-column .task-tile{padding:12px;border-radius:10px;box-shadow:none}
#team-tasks .task-column-empty{padding:12px;color:var(--muted);font-size:12px;line-height:1.5}
#team-tasks .task-tile{overflow-wrap:anywhere;touch-action:pan-y}
#team-tasks .task-tile-head{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px}
#team-tasks .task-title{font-size:14px;line-height:1.5;text-align:left}
#team-tasks .task-card-assignee{line-height:1.5;overflow-wrap:anywhere}
#team-tasks .task-tile[data-task-drag]{cursor:grab}
#team-tasks .task-tile[data-task-drag]:active{cursor:grabbing}
#team-tasks .task-moving{opacity:.6;pointer-events:none}
#team-tasks .task-dragging{opacity:.55}
#team-tasks .drop-ready{outline:2px solid var(--blue);outline-offset:-2px;background:var(--collab-selected,var(--panel))}
#team-tasks .drop-blocked{outline:2px dashed var(--muted);outline-offset:-2px}
#team-tasks .tasks-move-help{margin:10px 14px 0;font-size:12px;line-height:1.5;color:var(--muted)}
.task-move-button{border:1px solid var(--line);background:var(--collab-soft,var(--panel));border-radius:8px;color:var(--ink);padding:6px 9px;font-size:12px;min-height:32px;cursor:pointer}
.task-move-button:hover{border-color:var(--blue)}
#team-tasks button:focus-visible,#task-move-dialog button:focus-visible,#team-task-detail button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
#task-move-dialog .task-move-form{display:flex;align-items:end;gap:10px;margin:14px 0}
#task-move-dialog .task-move-form .field{flex:1;min-width:0;margin:0}
#task-move-dialog .task-move-form .btn{min-height:40px;flex-shrink:0}
#task-move-dialog .task-deadline-choices{margin:14px 0}
#task-move-dialog summary{cursor:pointer;font-weight:600;line-height:1.5}
#task-move-dialog .task-move-targets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#task-move-dialog .task-move-targets button{text-align:left;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--collab-soft,var(--panel));color:var(--ink);line-height:1.4;cursor:pointer}
#task-move-dialog .task-move-targets small{display:block;margin-top:5px;color:var(--muted);font-size:11px}
#task-move-error{line-height:1.5;color:var(--red,#b91c1c)}
#team-task-detail{min-width:0}
#team-task-detail .task-files{margin-top:16px;padding-top:8px;border-top:1px solid var(--line)}
#team-task-detail .task-files h3{font-size:14px;margin:8px 0}
#team-task-upload{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin:12px 0}
#team-task-upload .field{flex:1 1 240px;min-width:0;margin:0}
#team-task-upload input[type=file]{max-width:100%;font-size:12px}
#team-task-upload>small{flex-basis:100%}
.task-files-grid,.task-source-files{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:10px}
.task-attachment{min-width:0;padding:10px;border:1px solid var(--line);border-radius:10px;display:flex;flex-direction:column;gap:7px}
.task-attachment a{overflow-wrap:anywhere;font-size:13px;line-height:1.5}
.task-attachment a small{display:block;color:var(--muted)}
.task-attachment img,.task-attachment video,.task-source-files img,.task-source-files video{width:100%;height:auto;max-height:180px;object-fit:contain;border-radius:6px}
.task-attachment .link-button{text-align:left;font-size:12px;align-self:start}
.task-file-storage{font-size:12px;line-height:1.5;color:var(--muted)}
.task-file-storage.storage-error{color:var(--red,#b91c1c)}
.task-file-storage.storage-ready{color:var(--green,#15803d)}
#team-task-detail .task-events{max-height:270px}
@media(max-width:760px){
 #team-tasks .tasks-kanban{grid-auto-columns:min(82vw,300px);gap:10px;padding:10px}
 #team-tasks .task-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #team-tasks .task-filters>input[type=search]{grid-column:1/-1}
 #team-tasks .task-filters select{min-width:0;max-width:none;width:100%}
 #team-tasks .task-segment{max-width:100%;flex-wrap:wrap}
 #team-tasks .task-segment button,.task-move-button{min-height:40px}
 #task-move-dialog .task-move-form{align-items:stretch;flex-direction:column}
 #task-move-dialog .task-move-targets{grid-template-columns:1fr}
 #team-task-detail .task-detail-meta{grid-template-columns:1fr}
 #team-task-detail .dialog-actions{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){#team-tasks *{scroll-behavior:auto!important;transition:none!important}}

:root[data-theme=dark] #team-task-form input[type=datetime-local]{color-scheme:dark}
