/* ---- Tasks panel & kanban ---- */
.tasks-card { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-bottom: 0; }
.tasks-toolbar { display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; padding-bottom: 10px; border-bottom: 1px solid #eee; margin-bottom: 10px; }
.kanban-board { display: flex; gap: 10px; flex: 1; min-height: 0; overflow-x: auto; }
.kanban-col { display: flex; flex-direction: column; flex: 1; background: #f8f9fa; border-radius: 8px; padding: 10px; min-width: 260px; min-height: 0; overflow: hidden; }
.kanban-col-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.04em; padding-bottom: 8px; flex-shrink: 0; }
.kanban-count { background: #e0e0e0; border-radius: 10px; padding: 1px 7px; font-size: 0.75rem; font-weight: 600; }
.kanban-cards { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.kanban-empty { text-align: center; color: #ccc; font-size: 0.85rem; padding: 16px 0; }

/* ---- Task card ---- */
.task-card { background: white; border-radius: 6px; padding: 10px; border: 1px solid #e8e8e8; border-left: 3px solid #e8e8e8; flex-shrink: 0; position: relative; }
.task-card-high { border-left-color: #dc3545; }
.task-card-highlighted { box-shadow: 0 0 0 2px #0d6efd; }
.task-card-warning { border-left: 3px solid #f0a500 !important; background: #fffbf0; }
.task-card-overdue { border-left: 3px solid #dc3545 !important; background: #fff5f5; }

/* ---- Task card edge navigation arrows ---- */
.task-card-edge { position: absolute; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: transparent; padding: 0; line-height: 1; font-size: 0.65rem; transition: color 0.1s, background 0.1s; z-index: 1; border-radius: 3px; }
.task-card:hover .task-card-edge { color: #ccc; }
.task-card-edge:hover { color: #0d6efd; background: rgba(13,110,253,0.08); }
.task-card-edge-left   { top: 0; bottom: 0; left: 0; width: 10px; border-radius: 3px 0 0 3px; }
.task-card-edge-right  { top: 0; bottom: 0; right: 0; width: 10px; border-radius: 0 3px 3px 0; }
.task-card-edge-top    { left: 10px; right: 10px; top: 0; height: 10px; border-radius: 0; }
.task-card-edge-bottom { left: 10px; right: 10px; bottom: 0; height: 10px; border-radius: 0; }

/* ---- Task card content ---- */
.task-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.task-priority { font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.priority-high { background: #fde8e8; color: #dc3545; }
.priority-low { background: #e8f0e8; color: #2e7d32; }
.task-card-actions { display: flex; gap: 2px; }
.btn-task-icon { background: none; border: none; cursor: pointer; color: #bbb; font-size: 0.85rem; padding: 2px 5px; border-radius: 4px; line-height: 1; }
.btn-task-icon:hover { color: #555; background: #f0f0f0; }
.btn-task-icon:disabled { opacity: 0.2; cursor: default; }
.btn-task-icon:disabled:hover { color: #bbb; background: none; }
.btn-task-delete:hover { color: #dc3545; background: rgba(220,53,69,0.07); }
.task-title { font-size: 0.85rem; font-weight: 500; color: #333; margin-bottom: 4px; word-break: break-word; }
.task-desc { font-size: 0.78rem; color: #777; margin-bottom: 4px; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-assignee { font-size: 0.75rem; color: #888; margin-bottom: 2px; }
.task-sub-assignees { font-size: 0.75rem; color: #888; margin-bottom: 2px; }
.task-reporter { font-size: 0.72rem; color: #bbb; margin-bottom: 4px; }
.task-sub-assignee-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.88rem; padding: 3px 0; border-bottom: 1px solid #f0f0f0; }
.task-sub-assignee-row:last-child { border-bottom: none; }
.task-due { font-size: 0.75rem; color: #888; margin-top: 2px; }
.task-due-warning { color: #996300; font-weight: 500; }
.task-due-overdue { color: #b00020; font-weight: 600; }

/* ---- Task modal ---- */
.task-modal-card { max-width: 440px; }
.task-location-row { display: flex; align-items: center; gap: 6px; }
.task-location-coords { font-size: 0.82rem; color: #555; flex: 1; }
.task-location-empty { font-size: 0.82rem; color: #aaa; flex: 1; }
.task-location-place { font-size: 0.75rem; color: #666; }

/* ---- Import progress ---- */
.import-progress-wrap { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.import-progress-bar { height: 100%; background: #0d6efd; border-radius: 3px; transition: width 0.15s ease; }

/* ---- Task list filter toolbar ---- */
.tl-filter-bar { padding: 10px 14px 8px; border-bottom: 1px solid #eee; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.tl-filter-row { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.tl-filter-search { flex: 1; min-width: 120px; font-size: 0.82rem; padding: 5px 8px; border: 1px solid #ddd; border-radius: 6px; outline: none; background: #fff; color: #333; }
.tl-filter-search:focus { border-color: #0d6efd; }
.tl-filter-member { font-size: 0.82rem; padding: 5px 8px; border: 1px solid #ddd; border-radius: 6px; color: #333; background: #fff; cursor: pointer; max-width: 150px; }
.tl-chip { font-size: 0.75rem; padding: 3px 10px; border-radius: 12px; border: 1px solid #ddd; background: #f5f5f5; color: #555; cursor: pointer; white-space: nowrap; line-height: 1.4; }
.tl-chip:hover { border-color: #0d6efd; color: #0d6efd; }
.tl-chip.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.tl-chip-divider { color: #ddd; font-size: 0.8rem; padding: 0 2px; user-select: none; }
.tl-filter-clear { font-size: 0.75rem; color: #dc3545; cursor: pointer; white-space: nowrap; background: none; border: none; padding: 2px 4px; margin-left: auto; }
.tl-filter-clear:hover { text-decoration: underline; }

/* ---- Task list panel ---- */
.tasklist-card { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; overflow: hidden; }
.tasklist-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f0f0f0; transition: background 0.1s; }
.tasklist-row:last-child { border-bottom: none; }
.tasklist-row:hover { background: #fafafa; }
.tasklist-row-overdue { background: #fff5f5 !important; border-left: 3px solid #dc3545; }
.tasklist-row-warning { background: #fffbf0 !important; border-left: 3px solid #f0a500; }
.tasklist-row-left { flex: 1; min-width: 0; }
.tasklist-row-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.tasklist-row-title { font-size: 0.87rem; font-weight: 500; color: #222; word-break: break-word; }
.tasklist-row-desc { font-size: 0.78rem; color: #777; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tasklist-row-details { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; align-items: center; }
.tasklist-row-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; padding-top: 1px; }
.tl-status-badge { font-size: 0.7rem; font-weight: 600; padding: 1px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.tl-status-open { background: #e8f0ff; color: #1a56db; }
.tl-status-doing { background: #fff3cd; color: #856404; }
.tl-status-done { background: #d1f0d1; color: #1a6b1a; }

/* ---- Task event messages in chat ---- */
.chat-msg-event { align-self: stretch; background: #f3f4f6; border: none; color: #777; font-size: 0.75rem; border-radius: 4px; }
.task-event-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-style: italic; }
.task-event-time { font-style: normal; color: #aaa; font-size: 0.7rem; flex-shrink: 0; }
.btn-task-link { font-size: 0.72rem; padding: 1px 7px; background: #e5e7eb; border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer; color: #555; font-style: normal; white-space: nowrap; }
.btn-task-link:hover { background: #d1d5db; }
