/* =====================================================
   TaskHub  — DooTask 风格布局  v4  2026-08-06
   ===================================================== */

/* ── CSS 变量（全局）── */
:root {
  --c-bg:          #eef1f6;
  --c-bg-glow:     radial-gradient(1200px 480px at 12% -10%, rgba(22,93,255,.10), transparent 60%),
                   radial-gradient(900px 420px at 90% 0%, rgba(14,165,233,.08), transparent 55%),
                   linear-gradient(180deg, #f5f7fb 0%, #eef1f6 100%);
  --c-surface:     #ffffff;
  --c-surface-2:   #f8fafc;
  --c-border:      #e6eaf0;
  --c-border-strong:#d5dbe5;
  --c-text:        #111827;
  --c-text-2:      #475569;
  --c-text-3:      #94a3b8;
  --c-primary:     #2563eb;
  --c-primary-h:   #1d4ed8;
  --c-primary-soft:#eff6ff;
  --c-danger:      #ef4444;
  --c-danger-soft: #fef2f2;
  --c-warn:        #f59e0b;
  --c-warn-soft:   #fffbeb;
  --c-ok:          #10b981;
  --c-ok-soft:     #ecfdf5;
  --c-kanban:      #f1f5f9;
  --r-sm:          8px;
  --r:             12px;
  --r-lg:          16px;
  --r-xl:          20px;
  --shadow-sm:     0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-md:     0 4px 16px rgba(15,23,42,.06), 0 2px 6px rgba(15,23,42,.04);
  --shadow-lg:     0 16px 48px rgba(15,23,42,.12), 0 6px 16px rgba(15,23,42,.06);
  --font:          "Inter","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
}

/* ─────────────────────────── 基础重置 ─────────────────────────── */
.tasks-app, .tasks-app * { box-sizing: border-box; }
.tasks-loading, .tasks-gate, .tasks-app {
  font-family: var(--font);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.6;
}

/* ─────────────────────────── 应用容器 ────────────────────────── */
.tasks-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--c-bg-glow);
  font-size: 14.5px;
}

/* ─────────────────────────── 顶栏 ────────────────────────────── */
.tasks-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 58px;
  padding: 0 22px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230,234,240,.9);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
  flex-shrink: 0;
  z-index: 10;
}
.tasks-topbar__left,
.tasks-topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tasks-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--c-text-3);
  min-width: 0;
}
.tasks-breadcrumb a {
  color: var(--c-text-3);
  text-decoration: none;
  transition: color .15s;
}
.tasks-breadcrumb a:hover { color: var(--c-primary); }
.tasks-breadcrumb__sep { color: #c9cdd4; font-size: 12px; line-height: 1; }
.tasks-breadcrumb__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

/* ─────────────────────────── 按钮系统 ────────────────────────── */
.tasks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  background: var(--c-surface);
  color: var(--c-text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  user-select: none;
}
.tasks-btn:hover { background: #f7f8fa; border-color: #c9cdd4; color: var(--c-text); }
.tasks-btn:active { transform: scale(.98); }
.tasks-btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.tasks-btn--primary {
  background: linear-gradient(180deg, #3b82f6 0%, var(--c-primary) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(37,99,235,.28);
}
.tasks-btn--primary:hover {
  background: linear-gradient(180deg, #2563eb 0%, var(--c-primary-h) 100%);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(37,99,235,.32);
}
.tasks-btn--ghost { border-color: transparent; background: transparent; color: var(--c-text-3); }
.tasks-btn--ghost:hover { background: #f0f2f5; color: var(--c-text); border-color: transparent; }
.tasks-btn--danger { background: var(--c-danger-soft); border-color: #ffd0cb; color: var(--c-danger); }
.tasks-btn--danger:hover { background: #ffe4e0; }
.tasks-btn--icon { width: 34px; padding: 0; border-radius: var(--r-sm); }
.tasks-btn--sm { height: 28px; font-size: 12px; padding: 0 10px; border-radius: var(--r-sm); }
.tasks-btn--xs { height: 24px; font-size: 11px; padding: 0 8px; border-radius: 6px; }
.tasks-btn i { font-size: 16px; line-height: 1; flex-shrink: 0; }

/* 切换段 */
.tasks-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r);
  background: #f0f2f5;
  gap: 2px;
}
.tasks-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-text-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
}
.tasks-seg__btn.is-active {
  background: var(--c-surface);
  color: var(--c-primary);
  box-shadow: var(--shadow-sm);
}
.tasks-seg__btn i { font-size: 14px; }

/* ─────────────────────────── 主体布局 ────────────────────────── */
.tasks-body {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

/* ─────────────────────────── 侧栏 ────────────────────────────── */
.tasks-sidebar {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 280px;
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(248,250,252,.94) 100%);
  backdrop-filter: blur(14px);
  border-right: 1px solid rgba(226,232,240,.9);
  box-shadow: 4px 0 24px rgba(15,23,42,.03);
  position: relative;
  z-index: 30;
}
.tasks-sidebar__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
}
.tasks-sidebar__foot {
  flex-shrink: 0;
  padding: 12px;
  border-top: 1px solid rgba(226,232,240,.9);
  background: rgba(248,250,252,.9);
}
.tasks-create-split {
  display: flex;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(16,185,129,.28);
}
.tasks-create-split__main {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: filter .15s;
}
.tasks-create-split__main:hover { filter: brightness(1.05); }
.tasks-create-split__main i { font-size: 18px; }
.tasks-create-split__more {
  width: 40px;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(180deg, #2dd4a0 0%, #0ea572 100%);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter .15s;
}
.tasks-create-split__more:hover { filter: brightness(1.05); }
.tasks-create-menu {
  position: relative;
}
.tasks-create-menu__pop {
  position: absolute;
  left: 0; right: 0; bottom: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 40;
}
.tasks-create-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--c-text);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
}
.tasks-create-menu__item:hover { background: #f1f5f9; color: var(--c-primary); }
.tasks-create-menu__item i { font-size: 17px; color: var(--c-text-3); }
.tasks-sidebar__label {
  padding: 10px 10px 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.tasks-sidebar__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px 8px;
}
.tasks-sidebar__label-row .tasks-sidebar__label { padding: 0; flex: 1; }

/* 智能视图导航 */
.tasks-nav { display: flex; flex-direction: column; gap: 4px; }
.tasks-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #334155;
  font-size: 15px;
  font-weight: 550;
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: all .15s;
}
.tasks-nav-item i { font-size: 19px; color: #94a3b8; flex-shrink: 0; }
.tasks-nav-item:hover { background: #f1f5f9; color: #0f172a; }
.tasks-nav-item:hover i { color: var(--c-primary); }
.tasks-nav-item.is-active {
  background: #eff6ff;
  color: var(--c-primary);
  font-weight: 700;
}
.tasks-nav-item.is-active i { color: var(--c-primary); }

/* 项目列表 */
.tasks-proj-list { display: flex; flex-direction: column; gap: 4px; }
.tasks-proj-item {
  display: flex;
  align-items: center;
  border-radius: 12px;
  transition: background .15s;
}
.tasks-proj-item:hover { background: #f1f5f9; }
.tasks-proj-item.is-active {
  background: #eff6ff;
}
.tasks-proj-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}
.tasks-proj-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.tasks-proj-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tasks-tag-filter { padding: 0 2px 8px; }
.tasks-icon-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.tasks-btn.is-active-icon {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-soft);
}
.tasks-proj-preview__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.tasks-proj-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 550;
  color: #334155;
}
.tasks-proj-item.is-active .tasks-proj-name { color: var(--c-primary); font-weight: 700; }
.tasks-proj-badge {
  font-size: 12px;
  font-weight: 650;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0 8px;
  line-height: 22px;
  flex-shrink: 0;
}
.tasks-proj-item.is-active .tasks-proj-badge {
  background: #fff;
  border-color: #9ec5ff;
  color: var(--c-primary);
}
.tasks-proj-more {
  width: 26px;
  height: 26px;
  margin-right: 4px;
  flex-shrink: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--c-text-3);
  font-size: 15px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all .12s;
}
.tasks-proj-item:hover .tasks-proj-more { display: inline-flex; }
.tasks-proj-more:hover { background: rgba(0,0,0,.06); color: var(--c-text); }

/* 拖拽调宽手柄 */
.tasks-resize {
  position: absolute;
  top: 0; right: 0;
  width: 5px; height: 100%;
  cursor: col-resize;
  display: none;
  z-index: 1;
}
.tasks-resize::after {
  content: '';
  position: absolute;
  top: 10%; left: 2px;
  width: 1px; height: 80%;
  background: var(--c-border);
  opacity: 0;
  transition: opacity .15s;
}
.tasks-resize:hover::after { opacity: 1; background: var(--c-primary); }
@media (min-width: 768px) { .tasks-resize { display: block; } }

/* ─────────────────────────── 主内容区 ────────────────────────── */
.tasks-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ─────────────────────────── 看板 ────────────────────────────── */
.tasks-dashboard--kanban {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
}
.tasks-dashboard--kanban .tasks-hello-row { flex-shrink: 0; margin-bottom: 8px; }
.tasks-dashboard--kanban .tasks-hello { margin-bottom: 0; }
.tasks-kanban {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 12px;
  align-items: stretch;
}
.tasks-kanban--v2 .tasks-col {
  display: flex;
  flex-direction: column;
  width: 300px;
  max-width: 88vw;
  flex-shrink: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  max-height: 100%;
  border: 1px solid #e8edf3;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.tasks-col__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 10px;
  flex-shrink: 0;
}
.tasks-col__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(255,255,255,.8); }
.tasks-col__name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-col__count {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0 8px;
  line-height: 20px;
}
.tasks-col__add {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.tasks-col__add:hover { background: #fff; color: var(--c-primary); }
.tasks-col__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 任务卡片 */
.tasks-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px 12px 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  border: 1px solid #e8edf3;
  cursor: pointer;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  position: relative;
  overflow: hidden;
}
.tasks-card::before {
  content: '';
  position: absolute;
  top: 10px; left: 0;
  width: 3px; height: calc(100% - 20px);
  background: var(--card-accent, #cbd5e1);
  border-radius: 0 3px 3px 0;
}
.tasks-card:hover {
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
  border-color: #dbeafe;
  transform: translateY(-1px);
}
.tasks-card.is-dragging { opacity: .5; box-shadow: none; }
.tasks-card__title {
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.45;
  color: #0f172a;
  word-break: break-word;
}
.tasks-card__title.is-done { color: #94a3b8; text-decoration: line-through; }
.tasks-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}
.tasks-card__chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
}
.tasks-card__chip.is-overdue { color: #ef4444; background: #fef2f2; }
.tasks-card__chip i { font-size: 12px; }
.tasks-col__add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 42px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: all .15s;
}
.tasks-col__add-btn:hover { border-color: var(--c-primary); color: var(--c-primary); background: #eff6ff; }
.tasks-new-col-btn {
  min-width: 52px;
  height: auto;
  padding: 14px 10px;
  flex-shrink: 0;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  background: rgba(255,255,255,.55);
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  align-self: stretch;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .15s;
}
.tasks-new-col-btn i { font-size: 20px; }
.tasks-new-col-btn:hover { border-color: var(--c-primary); color: var(--c-primary); background: #fff; }

/* ─────────────────────────── 列表/仪表盘 ─────────────────────── */
.tasks-dashboard {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px 48px;
}
.tasks-hello { margin-bottom: 26px; }
.tasks-hello h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.03em;
  color: var(--c-text);
  letter-spacing: -.02em;
}
.tasks-hello__sub { margin: 8px 0 0; font-size: 14px; color: var(--c-text-3); }

.tasks-hello-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.tasks-hello-row .tasks-hello { margin-bottom: 0; flex: 1; min-width: 0; }
.tasks-dash-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tasks-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  min-width: 260px;
  width: 320px;
  max-width: 380px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid transparent;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.tasks-search:focus-within {
  background: #fff;
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.tasks-search i { color: #94a3b8; font-size: 20px; flex-shrink: 0; }
.tasks-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
  font-family: var(--font);
  color: var(--c-text);
}
.tasks-search input::placeholder { color: #94a3b8; }
.tasks-search__kbd {
  font-size: 12px;
  color: #94a3b8;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 2px 8px;
  line-height: 1.4;
  flex-shrink: 0;
}
.tasks-seg--lg {
  padding: 4px;
  border-radius: 12px;
  gap: 3px;
}
.tasks-seg--lg .tasks-seg__btn {
  height: 38px;
  padding: 0 16px;
  font-size: 14.5px;
  border-radius: 10px;
  gap: 6px;
}
.tasks-seg--lg .tasks-seg__btn i { font-size: 17px; }
.tasks-seg--dark .tasks-seg__btn.is-active {
  background: #334155;
  color: #fff;
  box-shadow: none;
}

/* 四象限 */
.tasks-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.tasks-quad {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  max-height: calc(50vh - 40px);
  background: #fff;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tasks-quad__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.tasks-quad__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tasks-quad__title {
  flex: 1;
  font-size: 13.5px;
  font-weight: 750;
  color: var(--c-text);
}
.tasks-quad__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-3);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0 8px;
  line-height: 22px;
}
.tasks-quad__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 8px 10px;
}
.tasks-quad__empty {
  padding: 28px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.tasks-quad__foot {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: #cbd5e1;
  flex-shrink: 0;
}
.tasks-quad-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s;
}
.tasks-quad-row:hover { background: #f8fafc; }
.tasks-quad-row__check {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.tasks-quad-row__check.is-done { color: var(--c-ok); }
.tasks-quad-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tasks-quad-row__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.tasks-quad-row__title.is-done {
  color: var(--c-text-3);
  text-decoration: line-through;
}
.tasks-quad-row__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.tasks-quad--danger .tasks-quad__title { color: #dc2626; }
.tasks-quad--danger .tasks-quad__dot { background: #ef4444; }
.tasks-quad--warn .tasks-quad__title { color: #d97706; }
.tasks-quad--warn .tasks-quad__dot { background: #f59e0b; }
.tasks-quad--ok .tasks-quad__title { color: #059669; }
.tasks-quad--ok .tasks-quad__dot { background: #10b981; }
.tasks-quad--primary .tasks-quad__title { color: #2563eb; }
.tasks-quad--primary .tasks-quad__dot { background: #3b82f6; }

@media (max-width: 960px) {
  .tasks-matrix {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .tasks-quad { max-height: 360px; }
  .tasks-hello-row { flex-direction: column; }
  .tasks-dash-tools { width: 100%; justify-content: stretch; }
  .tasks-search { max-width: none; flex: 1; }
}

/* 统计卡片 */
.tasks-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
@media (max-width: 1100px) { .tasks-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .tasks-stats { grid-template-columns: 1fr 1fr; } }

.tasks-stat {
  display: block;
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border: 1px solid rgba(230,234,240,.95);
  border-radius: var(--r-xl);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .2s cubic-bezier(.22,1,.36,1);
}
.tasks-stat:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.tasks-stat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tasks-stat__label { font-size: 12.5px; color: var(--c-text-3); font-weight: 500; }
.tasks-stat__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.tasks-stat__value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  margin-bottom: 5px;
}
.tasks-stat__hint { font-size: 11.5px; color: var(--c-text-3); }
.tasks-stat--danger .tasks-stat__value { color: var(--c-danger); }
.tasks-stat--danger .tasks-stat__icon { background: var(--c-danger-soft); color: var(--c-danger); }
.tasks-stat--warn .tasks-stat__value { color: var(--c-warn); }
.tasks-stat--warn .tasks-stat__icon { background: var(--c-warn-soft); color: var(--c-warn); }
.tasks-stat--primary .tasks-stat__value { color: var(--c-primary); }
.tasks-stat--primary .tasks-stat__icon { background: var(--c-primary-soft); color: var(--c-primary); }
.tasks-stat--ok .tasks-stat__value { color: var(--c-ok); }
.tasks-stat--ok .tasks-stat__icon { background: var(--c-ok-soft); color: var(--c-ok); }

/* 面板容器 */
.tasks-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tasks-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  background: #fafbfc;
}
.tasks-panel__title { font-size: 14px; font-weight: 600; color: var(--c-text); }
.tasks-panel__meta { font-size: 12.5px; color: var(--c-text-3); margin-top: 1px; }

/* 任务行 */
.tasks-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #f2f3f5;
  transition: background .1s;
  cursor: pointer;
}
.tasks-row:last-child { border-bottom: 0; }
.tasks-row:hover { background: #fafbfc; }
.tasks-row.is-selected { background: var(--c-primary-soft); }
.tasks-row__check {
  flex-shrink: 0;
  margin-top: 2px;
  border: 0;
  background: transparent;
  color: #c9cdd4;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
.tasks-row__check:hover { color: var(--c-primary); }
.tasks-row__check.is-done { color: var(--c-ok); }
.tasks-row__body { flex: 1; min-width: 0; }
.tasks-row__title { font-size: 14px; font-weight: 500; color: var(--c-text); word-break: break-word; }
.tasks-row__title.is-done { color: var(--c-text-3); text-decoration: line-through; }
.tasks-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--c-text-3);
}
.tasks-row__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.tasks-row__meta-item i { font-size: 12px; }
.tasks-overdue { color: var(--c-danger) !important; font-weight: 600; }

/* ─────────────────────────── 标签 Pill ───────────────────────── */
.tasks-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 2px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  /* 颜色由 inline style color: 属性提供，背景/边框基于父色 */
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
  line-height: 1.5;
  user-select: none;
  white-space: nowrap;
}
/* 当有 color style 时，颜色继承 */
.tasks-tag i { font-size: 10px; }

/* ─────────────────────────── 空状态 ──────────────────────────── */
.tasks-empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--c-text-3);
}
.tasks-empty__icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  color: #c9cdd4;
}
.tasks-empty p { margin: 0 0 16px; font-size: 14px; }
.tasks-empty .tasks-btn { margin: 0 auto; }

/* ─────────────────────────── 详情侧边栏 ──────────────────────── */
.tasks-detail {
  display: none;
  flex-direction: column;
  width: 380px;
  flex-shrink: 0;
  background: var(--c-surface);
  border-left: 1px solid var(--c-border);
  min-height: 0;
  z-index: 20;
}
.tasks-detail.is-open { display: flex; }

.tasks-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
  background: #fafbfc;
}
.tasks-detail__head-title { font-size: 13px; font-weight: 600; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .05em; }

.tasks-detail__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tasks-detail__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
  background: #fafbfc;
}

/* ─────────────────────────── 表单元素 ────────────────────────── */
.tasks-title-input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--c-border);
  padding: 2px 0 10px;
  font-size: 17px;
  font-weight: 650;
  color: var(--c-text);
  background: transparent;
  outline: none;
  font-family: var(--font);
  line-height: 1.4;
}
.tasks-title-input:focus { border-bottom-color: var(--c-primary); }
.tasks-title-input::placeholder { color: var(--c-text-3); font-weight: 400; }

.tasks-field label,
.tasks-field > .tasks-field__label {
  display: block;
  font-size: 11.5px;
  color: var(--c-text-3);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 5px;
}

/* ── 统一输入框 ── */
.tasks-input,
.tasks-textarea {
  width: 100%;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  padding: 8px 11px;
  font-size: 13px;
  background: var(--c-surface);
  color: var(--c-text);
  outline: none;
  font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.tasks-input:focus,
.tasks-textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(22,93,255,.1);
}
.tasks-input::placeholder,
.tasks-textarea::placeholder { color: var(--c-text-3); }
.tasks-textarea { resize: vertical; }

/* ── 自定义 Select 包裹 ── */
.tasks-select-wrap {
  position: relative;
  display: block;
}
.tasks-select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid #94a3b8;
  border-bottom: 1.5px solid #94a3b8;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  transition: border-color .15s;
}
.tasks-select-wrap:focus-within::after {
  border-color: var(--c-primary);
}
.tasks-select {
  width: 100%;
  height: 38px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  padding: 0 34px 0 12px;
  font-size: 13px;
  line-height: 1.3;
  background: #f8fafc;
  color: var(--c-text);
  outline: none;
  font-family: var(--font);
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.tasks-select:hover {
  background: #fff;
  border-color: #cbd5e1;
}
.tasks-select:focus {
  background: #fff;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(22,93,255,.1);
}
.tasks-input[type="date"],
.tasks-input {
  height: 38px;
  background: #f8fafc;
  box-sizing: border-box;
}
.tasks-input:hover {
  background: #fff;
  border-color: #cbd5e1;
}
.tasks-input:focus {
  background: #fff;
}
.tasks-textarea {
  height: auto;
  min-height: 88px;
  background: #f8fafc;
  box-sizing: border-box;
}
.tasks-textarea:hover {
  background: #fff;
  border-color: #cbd5e1;
}
.tasks-textarea:focus {
  background: #fff;
}

.tasks-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ─────────────────────────── 标签选择器 ──────────────────────── */
.tasks-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tasks-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--c-border);
  background: #f7f8fa;
  color: var(--c-text-2);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: all .12s;
  user-select: none;
}
.tasks-chip i { font-size: 12px; }
.tasks-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.tasks-chip.is-on {
  background: var(--c-primary-soft);
  border-color: #9ec5ff;
  color: var(--c-primary);
  font-weight: 600;
}

/* 标签编辑行 */
.tasks-tag-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.tasks-tag-color-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.15);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: transform .15s;
}
.tasks-tag-color-btn:hover { transform: scale(1.15); box-shadow: 0 0 0 2px var(--c-primary); }
.tasks-tag-name-input {
  flex: 1;
  border: 0;
  border-bottom: 1.5px solid transparent;
  padding: 2px 0;
  font-size: 13px;
  font-family: var(--font);
  color: var(--c-text);
  background: transparent;
  outline: none;
}
.tasks-tag-name-input:focus { border-bottom-color: var(--c-primary); }

/* ─────────────────────────── 子任务 ─────────────────────────── */
.tasks-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid #f5f6f7;
}
.tasks-sub:last-of-type { border-bottom: 0; }
.tasks-sub__check {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #c9cdd4;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
.tasks-sub__check:hover { color: var(--c-primary); }
.tasks-sub__check.is-done { color: var(--c-ok); }
.tasks-sub__text { flex: 1; font-size: 13px; }
.tasks-sub__text.is-done { color: var(--c-text-3); text-decoration: line-through; }
.tasks-sub__del {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #c9cdd4;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0;
  transition: opacity .12s, color .12s;
}
.tasks-sub:hover .tasks-sub__del { opacity: 1; }
.tasks-sub__del:hover { color: var(--c-danger); }

.tasks-inline { display: flex; gap: 8px; }
.tasks-inline .tasks-input { flex: 1; min-width: 0; }

/* ─────────────────────────── 附件 ────────────────────────────── */
.tasks-attach-list { display: flex; flex-direction: column; gap: 6px; }
.tasks-attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  background: #fafbfc;
  transition: border-color .15s;
}
.tasks-attach-item:hover { border-color: #c9cdd4; background: #f7f8fa; }
.tasks-attach-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.tasks-attach-icon--image { background: #fff0f6; color: #eb2f96; }
.tasks-attach-icon--doc   { background: #e6f7ff; color: #1890ff; }
.tasks-attach-icon--sheet { background: #f6ffed; color: #52c41a; }
.tasks-attach-icon--video { background: var(--c-warn-soft); color: var(--c-warn); }
.tasks-attach-meta { flex: 1; min-width: 0; }
.tasks-attach-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-attach-name a {
  color: inherit;
  text-decoration: none;
}
.tasks-attach-name a:hover { color: var(--c-primary); }
.tasks-attach-size { font-size: 11.5px; color: var(--c-text-3); margin-top: 1px; }
.tasks-attach-del {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #c9cdd4;
  font-size: 17px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0;
  transition: opacity .12s, color .12s;
}
.tasks-attach-item:hover .tasks-attach-del { opacity: 1; }
.tasks-attach-del:hover { color: var(--c-danger); }

.tasks-attach-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1.5px dashed #c9cdd4;
  border-radius: var(--r);
  background: transparent;
  color: var(--c-text-3);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: all .15s;
}
.tasks-attach-upload:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.tasks-attach-upload i { font-size: 18px; }

/* ─────────────────────────── 弹窗系统 ────────────────────────── */
.tasks-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 12, 22, .52);
  backdrop-filter: blur(3px);
}
@media (min-width: 540px) { .tasks-modal-mask { align-items: center; padding: 20px; } }

.tasks-modal {
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow: hidden;
  background: var(--c-surface);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.65);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
@media (min-width: 540px) { .tasks-modal { border-radius: 20px; } }
.tasks-modal--lg { max-width: 540px; }

.tasks-modal__head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  flex-shrink: 0;
}
.tasks-modal__head h3 { margin: 0; font-size: 18px; font-weight: 750; color: var(--c-text); letter-spacing: -.02em; }
.tasks-modal__head p { margin: 6px 0 0; font-size: 13px; color: var(--c-text-3); }

.tasks-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.tasks-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 8px;
  padding: 13px 22px;
  background: #fafbfc;
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}
.tasks-modal__foot.space-between { justify-content: space-between; }

/* 项目名称输入 */
.tasks-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 11px 14px;
  background: #f9fafc;
  transition: border-color .15s, box-shadow .15s;
}
.tasks-modal-title-wrap:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(22,93,255,.1);
  background: var(--c-surface);
}
.tasks-modal-title-wrap i { font-size: 20px; color: var(--c-text-3); flex-shrink: 0; }
.tasks-modal-title-input {
  flex: 1;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text);
  background: transparent;
  outline: none;
  font-family: var(--font);
  line-height: 1.5;
}
.tasks-modal-title-input::placeholder { color: var(--c-text-3); font-weight: 400; }

/* 颜色选择器 */
.tasks-swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.tasks-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: transform .15s;
}
.tasks-swatch:hover { transform: scale(1.12); }
.tasks-swatch.is-active { box-shadow: 0 0 0 2.5px var(--c-surface), 0 0 0 4.5px #1d2129; transform: scale(1.05); }

/* 图标选择器 */
.tasks-icon-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.tasks-icon-btn {
  height: 40px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  background: #f7f8fa;
  color: var(--c-text-2);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
}
.tasks-icon-btn:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.tasks-icon-btn.is-active { border-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary); box-shadow: inset 0 0 0 1px #9ec5ff; }

/* 项目预览 */
.tasks-proj-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f7f8fa;
  border-radius: var(--r);
  border: 1px solid var(--c-border);
}
.tasks-proj-preview__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  transition: all .2s;
  overflow: hidden;
}
.tasks-proj-preview__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─────────────────────────── 工具类 ──────────────────────────── */
.tasks-bad { color: var(--c-danger); font-size: 12.5px; margin: 0; }
.tasks-ok  { color: var(--c-ok);     font-size: 12.5px; margin: 0; }
.tasks-error {
  padding: 9px 16px;
  background: var(--c-danger-soft);
  color: var(--c-danger);
  font-size: 13px;
  border-bottom: 1px solid #ffd0cb;
  flex-shrink: 0;
}
.tasks-danger-link {
  border: 0;
  background: transparent;
  color: var(--c-danger);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity .15s;
}
.tasks-danger-link:hover { opacity: .7; }
.tasks-danger-link i { font-size: 15px; }
.tasks-divider { height: 1px; background: var(--c-border); margin: 4px 0; }
.tasks-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text-3);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.tasks-check-label input { width: 14px; height: 14px; accent-color: var(--c-primary); cursor: pointer; }

/* ─────────────────────────── FAB ────────────────────────────── */
.tasks-fab {
  position: fixed;
  right: 18px; bottom: 22px;
  z-index: 40;
  width: 52px; height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-size: 26px;
  box-shadow: 0 8px 24px rgba(22,93,255,.4);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.tasks-fab:hover { transform: scale(1.08); box-shadow: 0 12px 28px rgba(22,93,255,.45); }
.tasks-menu-btn {
  display: none !important;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 40;
  background: rgba(255,255,255,.92) !important;
  box-shadow: var(--shadow-sm);
}
.tasks-board-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 0;
  flex-shrink: 0;
}
.tasks-board-bar__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─────────────────────────── 授权门 ─────────────────────────── */
.tasks-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 32px;
  text-align: center;
  background: var(--c-bg);
}
.tasks-gate__icon {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(22,93,255,.35);
}
.tasks-gate h1 { margin: 0; font-size: 24px; font-weight: 700; color: var(--c-text); }
.tasks-gate p { margin: 10px 0 0; color: var(--c-text-3); font-size: 15px; max-width: 340px; }
.tasks-gate .tasks-btn { margin-top: 22px; height: 42px; padding: 0 30px; font-size: 15px; }
.tasks-gate__link { margin-top: 14px; color: var(--c-text-3); text-decoration: none; font-size: 14px; display: block; }
.tasks-gate__link:hover { color: var(--c-primary); }

.tasks-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--c-text-3);
  font-size: 15px;
  background: var(--c-bg);
  font-family: var(--font);
}

/* ─────────────────────────── 响应式 ─────────────────────────── */
@media (max-width: 767px) {
  .tasks-menu-btn { display: inline-flex !important; }
  .tasks-fab { display: flex; }
  .tasks-hide-sm { display: none !important; }
  .tasks-main { padding-top: 0; }
  .tasks-dashboard { padding-top: 52px; }
  .tasks-board-bar { padding-top: 52px; }

  .tasks-sidebar {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    transform: translateX(-105%);
    transition: transform .22s cubic-bezier(.22,1,.36,1);
    box-shadow: 8px 0 32px rgba(0,0,0,.14);
  }
  .tasks-sidebar.is-open { transform: translateX(0); }

  .tasks-backdrop {
    position: absolute;
    inset: 0;
    z-index: 25;
    background: rgba(0,14,25,.36);
  }

  .tasks-detail.is-open {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 35;
  }

  .tasks-dashboard { padding: 14px 12px 32px; }
  .tasks-kanban { padding: 10px 10px 16px; }
  .tasks-topbar { padding: 0 14px; height: 50px; }
}

/* ─────────────────────────── 滚动条 ─────────────────────────── */
.tasks-col__body, .tasks-kanban, .tasks-dashboard,
.tasks-detail__body, .tasks-modal__body, .tasks-sidebar__scroll {
  scrollbar-width: thin;
  scrollbar-color: #dde1e7 transparent;
}
.tasks-col__body::-webkit-scrollbar,
.tasks-kanban::-webkit-scrollbar,
.tasks-dashboard::-webkit-scrollbar,
.tasks-detail__body::-webkit-scrollbar,
.tasks-modal__body::-webkit-scrollbar,
.tasks-sidebar__scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.tasks-col__body::-webkit-scrollbar-thumb,
.tasks-kanban::-webkit-scrollbar-thumb,
.tasks-dashboard::-webkit-scrollbar-thumb,
.tasks-detail__body::-webkit-scrollbar-thumb,
.tasks-modal__body::-webkit-scrollbar-thumb,
.tasks-sidebar__scroll::-webkit-scrollbar-thumb { background: #dde1e7; border-radius: 4px; }

/* ─────────────────────────── DooTask 风格表格列表 ─────────────── */
.tasks-table-wrap {
  background: var(--c-surface);
  border: 1px solid rgba(230,234,240,.95);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.tasks-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, #fff 0%, var(--c-surface-2) 100%);
}
.tasks-group { border-bottom: 1px solid #eef2f7; }
.tasks-group:last-child { border-bottom: 0; }
.tasks-group__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
}
.tasks-group__head--danger { background: linear-gradient(90deg, #fef2f2, #fff7f7); color: #dc2626; }
.tasks-group__head--warn   { background: linear-gradient(90deg, #fffbeb, #fffaf0); color: #d97706; }
.tasks-group__head--ok     { background: linear-gradient(90deg, #ecfdf5, #f3fdf8); color: #059669; }
.tasks-group__head--muted  { background: linear-gradient(90deg, #f8fafc, #f1f5f9); color: var(--c-text-2); }
.tasks-group__count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11.5px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.04);
}
.tasks-table-head,
.tasks-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 2.2fr) minmax(120px, 1.4fr) minmax(90px, .9fr) 96px 90px 80px 110px;
  gap: 12px;
  align-items: center;
  padding: 0 20px;
}
.tasks-table-head {
  height: 42px;
  font-size: 12px;
  font-weight: 650;
  color: var(--c-text-3);
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  letter-spacing: .02em;
}
.tasks-table-row {
  min-height: 68px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.tasks-table-row:last-child { border-bottom: 0; }
.tasks-table-row:hover {
  background: linear-gradient(90deg, #f8fbff, #fafbfc);
}
.tasks-table-row.is-selected {
  background: #f0f7ff;
}
.tasks-table-cell { min-width: 0; font-size: 13.5px; color: var(--c-text-2); }
.tasks-table-task {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tasks-table-task .tasks-row__check {
  flex-shrink: 0;
  font-size: 22px;
}
.tasks-table-task__main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}
.tasks-table-task__title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.015em;
  color: var(--c-text);
  line-height: 1.4;
}
.tasks-table-task__title.is-done {
  color: var(--c-text-3);
  text-decoration: line-through;
  font-weight: 550;
}
.tasks-table-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.tasks-table-notes {
  font-size: 13px;
  color: var(--c-text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
.tasks-status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #f1f5f9;
  color: var(--c-text-2);
}
.tasks-status--todo  { background: #fef2f2; color: #dc2626; }
.tasks-status--doing { background: #fffbeb; color: #d97706; }
.tasks-status--done  { background: #ecfdf5; color: #059669; }
.tasks-prio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text-2);
  white-space: nowrap;
}
.tasks-prio__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}
.tasks-subprog {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--c-text-3);
  font-weight: 550;
}
.tasks-subprog__bar {
  height: 4px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}
.tasks-subprog__fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, var(--c-primary));
  border-radius: 99px;
}
.tasks-due-cell { font-size: 13px; white-space: nowrap; font-weight: 550; }
.tasks-due-cell.is-overdue { color: var(--c-danger); font-weight: 700; }
.tasks-due-cell.is-today   { color: var(--c-warn); font-weight: 700; }

@media (max-width: 1100px) {
  .tasks-table-head,
  .tasks-table-row {
    grid-template-columns: minmax(180px, 2fr) minmax(100px, 1.2fr) 88px 80px 96px;
  }
  .tasks-hide-lg { display: none !important; }
}
@media (max-width: 960px) {
  .tasks-table-head,
  .tasks-table-row {
    grid-template-columns: minmax(160px, 1.8fr) 88px 80px 96px;
  }
  .tasks-hide-md { display: none !important; }
}

/* ── 可删除标签 Pill ── */
.tasks-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 8px;
}
.tasks-tag-pill {
  --tag-c: #6366f1;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px 6px 11px;
  margin: 2px 4px 2px 0;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--tag-c);
  background: #f8fafc;
  border: 1.5px solid rgba(148,163,184,.35);
  line-height: 1.35;
  max-width: 100%;
}
.tasks-tag-pill__x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #1e293b;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 6px rgba(15,23,42,.25);
  opacity: .92;
  transition: transform .12s, background .12s;
}
.tasks-tag-pill__x:hover {
  background: var(--c-danger);
  transform: scale(1.08);
}
.tasks-tag-add {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.tasks-tag-add .tasks-input { flex: 1; min-width: 0; }
.tasks-tag-add__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--c-text-3);
}

/* ─────────────────────────── 详情弹窗（标签页）────────────────── */
.tasks-modal--detail {
  max-width: 960px;
  width: min(960px, 96vw);
  height: min(880px, 94vh);
  max-height: 94vh;
}
.tasks-modal--detail .tasks-modal__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.tasks-detail-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 20px 0;
  border-bottom: 1px solid var(--c-border);
  background: #fff;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tasks-detail-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.tasks-detail-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  color: var(--c-text-3);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.tasks-detail-tab i { font-size: 16px; }
.tasks-detail-tab:hover { color: var(--c-text); }
.tasks-detail-tab.is-active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}
.tasks-detail-tab__badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tasks-detail-tab.is-active .tasks-detail-tab__badge {
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.tasks-detail-pane {
  padding: 22px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #fff;
}
.tasks-detail-pane--info {
  overflow-y: auto;
}
.tasks-detail-pane--logs {
  padding: 0;
  overflow: hidden;
  gap: 0;
}
.tasks-log-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 22px 12px;
}
.tasks-log-compose--dock {
  flex-shrink: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: 0 -6px 18px rgba(15,23,42,.04);
  z-index: 1;
}
.tasks-log-compose--dock .tasks-textarea {
  min-height: 72px;
}
.tasks-modal--detail .tasks-modal__head h3 {
  max-width: min(640px, 70vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-sub__done-at {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--c-text-3);
  white-space: nowrap;
}
.tasks-log-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.tasks-log-card__avatar--img {
  padding: 0;
  overflow: hidden;
  background: #e2e8f0;
}
.tasks-detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
@media (max-width: 560px) {
  .tasks-detail-meta-grid { grid-template-columns: 1fr; }
  .tasks-detail-pane { padding: 16px; }
  .tasks-modal--detail { height: min(920px, 96vh); width: 96vw; }
}

/* ── 附件预览 / 列表 ── */
.tasks-attach-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tasks-attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.tasks-attach-card {
  border: 1.5px solid var(--c-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fafbfc;
  transition: border-color .15s, box-shadow .15s;
}
.tasks-attach-card:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow-sm);
}
.tasks-attach-card__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  background: #f1f5f9;
  cursor: pointer;
  border: 0;
  width: 100%;
  padding: 0;
}
.tasks-attach-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tasks-attach-card__preview i { font-size: 32px; color: #94a3b8; }
.tasks-attach-card__meta {
  padding: 8px 10px 10px;
}
.tasks-attach-card__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-attach-card__size {
  font-size: 11.5px;
  color: var(--c-text-3);
  margin-top: 2px;
}
.tasks-attach-table {
  width: 100%;
  border-collapse: collapse;
}
.tasks-attach-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  color: var(--c-text-3);
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
}
.tasks-attach-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  color: var(--c-text-2);
  vertical-align: middle;
}
.tasks-attach-table tr:last-child td { border-bottom: 0; }
.tasks-attach-table__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 550;
  color: var(--c-text);
}
.tasks-attach-table__name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-attach-table__ops {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

/* 图片预览灯箱 */
.tasks-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, .78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.tasks-lightbox__panel {
  position: relative;
  max-width: min(960px, 94vw);
  max-height: 90vh;
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.tasks-lightbox__panel img {
  display: block;
  max-width: 94vw;
  max-height: 82vh;
  object-fit: contain;
  background: #0f172a;
}
.tasks-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15,23,42,.92);
  color: #e2e8f0;
  font-size: 13px;
}
.tasks-lightbox__bar button {
  border: 0;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}
.tasks-lightbox__bar button:hover { color: #fff; }

/* ─────────────────────────── 工作日志 ────────────────────────── */
.tasks-log-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.tasks-log-compose .tasks-textarea {
  min-height: 88px;
  background: #fff;
  border-radius: 10px;
}
.tasks-log-compose__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tasks-log-pending {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tasks-log-pending__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-size: 12.5px;
  max-width: 180px;
  font-weight: 550;
}
.tasks-log-pending__chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-log-pending__chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 14px;
}
.tasks-log-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.tasks-log-card {
  position: relative;
  padding: 14px 16px 14px 18px;
  border-radius: 14px;
  border: 1px solid #e8edf3;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  transition: border-color .15s, box-shadow .15s;
}
.tasks-log-card:hover {
  border-color: #dbeafe;
  box-shadow: var(--shadow-sm);
}
.tasks-log-card--system {
  background: linear-gradient(90deg, #f8fafc, #fff);
  border-style: dashed;
}
.tasks-log-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.tasks-log-card__avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-size: 14px;
  flex-shrink: 0;
}
.tasks-log-card--system .tasks-log-card__avatar {
  background: #f1f5f9;
  color: #64748b;
}
.tasks-log-card__who {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
}
.tasks-log-card__time {
  font-size: 12px;
  color: var(--c-text-3);
  font-weight: 500;
}
.tasks-log-card__content {
  font-size: 13.5px;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  padding-left: 36px;
}
.tasks-log-card__attach {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-left: 36px;
}
.tasks-log-card__file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12.5px;
  color: var(--c-text-2);
  text-decoration: none;
  max-width: 100%;
  font-weight: 550;
}
.tasks-log-card__file:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.tasks-log-card__file i { font-size: 15px; }
.tasks-log-empty {
  text-align: center;
  padding: 40px 12px;
  color: var(--c-text-3);
  font-size: 13.5px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px dashed #e2e8f0;
}

/* ─────────────────────────── 日志表格（Element Plus Table）──── */
.tasks-el-table {
  width: 100%;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.tasks-el-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  color: #606266;
}
.tasks-el-table thead th {
  background: #fafafa;
  color: #909399;
  font-weight: 500;
  font-size: 14px;
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid #ebeef5;
  white-space: nowrap;
}
.tasks-el-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #ebeef5;
  vertical-align: middle;
  background: #fff;
  transition: background .12s;
}
.tasks-el-table tbody tr:last-child td { border-bottom: 0; }
.tasks-el-table tbody tr:hover > td { background: #f5f7fa; }
.tasks-el-table tbody tr.is-system > td { background: #fcfcfd; }
.tasks-el-table tbody tr.is-system:hover > td { background: #f5f7fa; }
.tasks-log-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tasks-log-who__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ecf5ff;
  color: #409eff;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.tasks-log-who__avatar--sys {
  background: #f4f4f5;
  color: #909399;
}
.tasks-log-who__avatar--img { padding: 0; background: #e4e7ed; }
.tasks-log-who__avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tasks-log-who__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.tasks-log-who__name {
  font-weight: 500;
  color: #303133;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  line-height: 1.2;
}
.tasks-el-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  width: fit-content;
  border: 1px solid transparent;
}
.tasks-el-tag--primary {
  background: #ecf5ff;
  border-color: #d9ecff;
  color: #409eff;
}
.tasks-el-tag--info {
  background: #f4f4f5;
  border-color: #e9e9eb;
  color: #909399;
}
.tasks-log-table__content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  color: #606266;
  font-size: 13.5px;
}
.tasks-log-table__content--ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.4;
}
.tasks-log-attach-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #f4f4f5;
  color: #909399;
  font-size: 12px;
  font-weight: 650;
}
.tasks-log-ops {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tasks-log-op {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #909399;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.tasks-log-op:hover { background: #ecf5ff; color: #409eff; }
.tasks-log-op--danger:hover { background: #fef0f0; color: #f56c6c; }
.tasks-el-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding: 0 2px;
}
.tasks-el-pager__btn {
  width: 28px;
  height: 28px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  color: #606266;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tasks-el-pager__btn:hover:not(:disabled) { color: #409eff; border-color: #c6e2ff; }
.tasks-el-pager__btn:disabled { opacity: .45; cursor: not-allowed; }
.tasks-el-pager__info {
  font-size: 13px;
  color: #606266;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
}
.tasks-log-detail-who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 650;
  color: #303133;
}
.tasks-log-detail-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  color: #606266;
  font-size: 14px;
  padding: 14px 16px;
  background: #fafafa;
  border: 1px solid #ebeef5;
  border-radius: 8px;
}
.tasks-modal--log { max-width: 560px; }
.tasks-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e1f3d8;
  color: #67c23a;
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
  font-size: 14px;
  font-weight: 600;
  animation: tasks-ep-pop .16s ease-out;
}
.tasks-toast i { font-size: 18px; }
.tasks-log-table__muted { color: #c0c4cc; }
.tasks-log-table__files {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tasks-el-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: #409eff;
  font-size: 13px;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}
.tasks-el-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-el-link:hover { color: #79bbff; }
.tasks-el-link--danger { color: #f56c6c; }
.tasks-el-link--danger:hover { color: #f89898; }
.tasks-log-table__time {
  color: #909399;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────── Element 风格选择器 ──────────────── */
.tasks-ep-select,
.tasks-ep-date {
  position: relative;
  width: 100%;
}
.tasks-ep-select.is-disabled { opacity: .55; pointer-events: none; }
.tasks-ep-select__trigger,
.tasks-ep-date__trigger {
  width: 100%;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  background: #fff;
  color: #303133;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  text-align: left;
  box-sizing: border-box;
  user-select: none;
}
.tasks-ep-date__trigger:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(22,93,255,.12);
  outline: none;
}
.tasks-ep-select__trigger:hover,
.tasks-ep-date__trigger:hover {
  border-color: #c0c4cc;
}
.tasks-ep-select.is-open .tasks-ep-select__trigger,
.tasks-ep-date.is-open .tasks-ep-date__trigger,
.tasks-ep-select__trigger:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(22,93,255,.12);
  outline: none;
}
.tasks-ep-select__trigger span,
.tasks-ep-date__trigger span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-ep-select__trigger .is-placeholder,
.tasks-ep-date__trigger .is-placeholder {
  color: #a8abb2;
}
.tasks-ep-select__caret,
.tasks-ep-date__caret {
  color: #a8abb2;
  font-size: 16px;
  transition: transform .18s;
  flex-shrink: 0;
}
.tasks-ep-select.is-open .tasks-ep-select__caret,
.tasks-ep-date.is-open .tasks-ep-date__caret {
  transform: rotate(180deg);
  color: var(--c-primary);
}
.tasks-ep-select__mask,
.tasks-ep-date__mask {
  position: fixed;
  inset: 0;
  z-index: 5190;
  background: transparent;
}
.tasks-ep-select__panel {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #e4e7ed;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.06);
  animation: tasks-ep-pop .14s ease-out;
}
.tasks-ep-select__empty {
  padding: 18px 10px;
  text-align: center;
  color: #a8abb2;
  font-size: 13px;
}
.tasks-ep-select__option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #606266;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
}
.tasks-ep-select__option i {
  width: 16px;
  font-size: 14px;
  color: transparent;
  flex-shrink: 0;
}
.tasks-ep-select__option.is-selected {
  color: var(--c-primary);
  font-weight: 650;
  background: #f0f5ff;
}
.tasks-ep-select__option.is-selected i { color: var(--c-primary); }
.tasks-ep-select__option:hover { background: #f5f7fa; }
.tasks-ep-select__check-ph { display: inline-block; width: 16px; height: 1px; }
.tasks-ep-select--multi .tasks-ep-select__trigger--multi {
  height: auto;
  min-height: 38px;
  padding: 4px 10px;
  align-items: flex-start;
}
.tasks-ep-select__tags {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
}
.tasks-ep-select__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  height: 24px;
  padding: 0 6px 0 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--tag-c, #409eff) 12%, #fff);
  color: var(--tag-c, #409eff);
  border: 1px solid color-mix(in srgb, var(--tag-c, #409eff) 28%, #fff);
  font-size: 12px;
  font-weight: 600;
}
.tasks-ep-select__tag span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.tasks-ep-select__tag-x {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  opacity: .75;
}
.tasks-ep-select__tag-x:hover { opacity: 1; }
.tasks-ep-select__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tasks-ep-select__option i.ri-checkbox-fill,
.tasks-ep-select__option i.ri-checkbox-blank-line {
  color: #c0c4cc;
}
.tasks-ep-select__option.is-selected i.ri-checkbox-fill {
  color: #409eff;
}

.tasks-ep-date__trigger i.ri-calendar-line {
  color: #a8abb2;
  font-size: 16px;
  flex-shrink: 0;
}
.tasks-ep-date__clear {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c0c4cc;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.tasks-ep-date__clear:hover { color: #909399; }
.tasks-ep-date__panel {
  padding: 12px;
  border: 1px solid #e4e7ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.06);
  animation: tasks-ep-pop .14s ease-out;
}
.tasks-ep-date__head {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 10px;
}
.tasks-ep-date__title {
  flex: 1;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #303133;
}
.tasks-ep-date__nav {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #909399;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.tasks-ep-date__nav:hover { background: #f5f7fa; color: var(--c-primary); }
.tasks-ep-date__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.tasks-ep-date__weekdays span {
  text-align: center;
  font-size: 12px;
  color: #a8abb2;
  font-weight: 600;
  line-height: 28px;
}
.tasks-ep-date__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.tasks-ep-date__cell {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #606266;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.tasks-ep-date__cell:hover:not(:disabled) { background: #f5f7fa; }
.tasks-ep-date__cell.is-out {
  visibility: hidden;
  pointer-events: none;
}
.tasks-ep-date__cell.is-today {
  color: var(--c-primary);
  font-weight: 700;
}
.tasks-ep-date__cell.is-selected {
  background: var(--c-primary) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(22,93,255,.28);
}
.tasks-ep-date__body {
  display: flex;
  align-items: stretch;
}
.tasks-ep-date__cal { flex: 1; min-width: 0; }
.tasks-ep-date__panel--dt {
  padding: 0;
  overflow: hidden;
}
.tasks-ep-date__panel--dt .tasks-ep-date__body {
  padding: 12px 12px 0;
}
.tasks-ep-date__panel--dt .tasks-ep-date__foot {
  margin-top: 0;
  padding: 8px 12px;
}
.tasks-ep-date__time {
  display: flex;
  width: 110px;
  margin-left: 8px;
  border-left: 1px solid #e4e7ed;
  flex-shrink: 0;
}
.tasks-ep-date__time-col {
  flex: 1;
  max-height: 224px;
  overflow-y: auto;
  padding: 0 2px;
  scrollbar-width: thin;
}
.tasks-ep-date__time-col + .tasks-ep-date__time-col {
  border-left: 1px solid #f0f2f5;
}
.tasks-ep-date__time-item {
  width: 100%;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #606266;
  font-size: 12px;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.tasks-ep-date__time-item:hover { background: #f5f7fa; }
.tasks-ep-date__time-item.is-active {
  color: #409eff;
  font-weight: 700;
  background: #ecf5ff;
}
.tasks-ep-date__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e4e7ed;
}
.tasks-ep-date__foot-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.tasks-ep-date__draft {
  font-size: 12px;
  color: #909399;
  font-variant-numeric: tabular-nums;
}
.tasks-ep-date__link,
.tasks-ep-date__today {
  border: 0;
  background: transparent;
  color: #409eff;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.tasks-ep-date__link:hover,
.tasks-ep-date__today:hover { background: #ecf5ff; }
.tasks-ep-date__ok {
  height: 28px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: #409eff;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}
.tasks-ep-date__ok:hover { background: #66b1ff; }

@keyframes tasks-ep-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .tasks-el-link span { max-width: 72px; }
  .tasks-ep-date__panel--dt { min-width: min(96vw, 420px) !important; }
  .tasks-ep-date__time { width: 96px; }
}
