/* 九派IM · 任务模块样式 (独立文件, 只作用于 #taskPane / .task-*) */
#taskPane { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
#taskHead {
  height: 56px; flex: none; display: flex; align-items: center; gap: 16px;
  padding: 0 20px; border-bottom: 1px solid var(--line);
}
.task-h-title { font-size: 16px; font-weight: 600; }
.task-h-spacer { flex: 1; }
.task-tabs { display: flex; gap: 4px; }
.task-tab {
  padding: 6px 14px; font-size: 13px; color: var(--txt2); cursor: pointer; border-radius: 6px;
}
.task-tab:hover { background: #f1f3f6; }
.task-tab.active { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
#taskBody { flex: 1; overflow-y: auto; padding: 14px 20px 20px; max-width: 860px; }

/* 任务行 */
.task-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; cursor: pointer;
}
.task-row:hover { box-shadow: 0 3px 12px rgba(30,60,120,.08); }
.task-row.done .task-title { text-decoration: line-through; color: var(--txt2); }
.task-ck {
  width: 20px; height: 20px; border: 2px solid #c7cdd8; border-radius: 50%; flex: none;
  cursor: pointer; font-size: 12px; line-height: 17px; text-align: center; color: #fff;
  margin-top: 1px; transition: background .12s, border-color .12s;
}
.task-ck:hover { border-color: var(--accent); }
.task-ck.on { background: #34a853; border-color: #34a853; }
.task-ck.sm { width: 16px; height: 16px; font-size: 10px; line-height: 13px; border-width: 1.5px; }
.task-mid { flex: 1; min-width: 0; }
.task-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.task-sub { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--txt2); }
.task-due.late, .task-dt-row.late { color: #d4433b; font-weight: 600; }
.task-empty { text-align: center; color: #9aa2af; font-size: 13px; padding: 70px 0; }

/* 优先级标签 */
.task-pri { font-size: 11px; padding: 1px 7px; border-radius: 4px; flex: none; }
.task-pri.p-low { background: #f1f3f6; color: #6b7382; }
.task-pri.p-normal { background: var(--accent-weak); color: var(--accent); }
.task-pri.p-high { background: #fff4e0; color: #b0730d; }
.task-pri.p-urgent { background: #fdebea; color: #d4433b; }

/* 模块私有弹层(复用 calendar.css 的 .cal-m-* 结构样式, 容器独立) */
#taskMask { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 320; display: flex; align-items: center; justify-content: center; }
#taskMask.hidden { display: none !important; }
#taskBox { background: #fff; border-radius: 12px; width: 520px; max-width: 92vw; max-height: 84vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
#taskBox .cal-m-head { height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; }
#taskBox .cal-close { cursor: pointer; color: var(--txt2); font-size: 14px; }
#taskBox .cal-m-body { padding: 16px 18px 6px; overflow-y: auto; flex: 1; }
#taskBox .cal-m-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.task-share-list { border: 1px solid var(--line); border-radius: 8px; max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.task-share-item { padding: 9px 14px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f1f3f6; }
.task-share-item:last-child { border-bottom: none; }
.task-share-item:hover { background: var(--accent-weak); }

/* 表单 */
.task-form-row { display: flex; gap: 8px; align-items: center; }
.task-form-row label { font-size: 13px; color: var(--txt2); flex: none; }
.task-ass-head { font-size: 13px; font-weight: 600; margin: 4px 0 8px; }
.task-ass-sug { border: 1px solid var(--line); border-radius: 8px; margin: -8px 0 10px; max-height: 180px; overflow-y: auto; }
.task-sug-item { padding: 7px 12px; font-size: 13px; cursor: pointer; }
.task-sug-item:hover { background: var(--accent-weak); }
.task-sug-item span { color: var(--txt2); font-size: 12px; margin-left: 8px; }
.task-ass-picked { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.task-ass-tag {
  background: var(--accent-weak); color: var(--accent); font-size: 12px;
  padding: 3px 8px; border-radius: 12px; display: inline-flex; gap: 5px; align-items: center;
}
.task-ass-tag i { cursor: pointer; font-style: normal; opacity: .7; }

/* 详情 */
.task-dt-title { font-size: 17px; font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.task-dt-title.done { text-decoration: line-through; color: var(--txt2); }
.task-dt-desc { background: #f6f7f9; border-radius: 8px; padding: 10px 12px; font-size: 13px; white-space: pre-wrap; margin-bottom: 10px; }
.task-dt-row { font-size: 13px; margin-bottom: 7px; color: #37404d; }

/* 消息卡片(聊天气泡内) */
.task-card { min-width: 230px; max-width: 320px; cursor: pointer; }
.task-card.is-done .task-card-head b { text-decoration: line-through; color: var(--txt2); }
.task-card-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.task-card-row { font-size: 12.5px; color: #37404d; margin-bottom: 3px; }
.task-card-sub { font-size: 12px; color: var(--txt2); margin-top: 4px; }
.task-card-state { font-size: 11.5px; color: var(--txt2); margin-top: 6px; min-height: 14px; }

/* 移动端 */
@media (max-width: 520px) {
  #taskPane:not(.hidden) { flex: 1; min-height: 0; }
  #taskHead { flex-wrap: wrap; height: auto; padding: 8px 10px; gap: 8px; }
  #taskBody { padding: 8px; }
}
.task-card.is-gone { opacity: .55; cursor: default; }
.task-card.is-gone .task-card-head b { text-decoration: line-through; color: var(--txt2); }
