/* 项目协作云 —— 靛紫色、浅色侧栏、卡片式看板 */
:root {
  --primary: #6352f5; --primary-hover: #7a6cf7; --primary-active: #4f3fe0;
  --primary-1: #f3f1ff; --primary-2: #e6e2ff; --primary-3: #c4bcfd;
  --success: #10b981; --success-1: #e7f8f1; --warning: #f59e0b; --warning-1: #fef5e6; --danger: #e5484d; --danger-1: #fdecec;
  --text: #1c1d2b; --text-2: #4b5068; --text-3: #8a90a6; --text-4: #c8ccd8;
  --border: #e4e6ef; --border-2: #eef0f5; --bg: #f6f6fa; --fill: #f5f6fa;
  --radius: 12px; --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(28, 29, 43, .04), 0 1px 6px rgba(28, 29, 43, .04);
  --side: 236px;
}
body { background: var(--bg); }
.fw4 { font-weight: 400; } .mt4 { margin-top: 4px; } .w100 { width: 100%; } .nowrap { white-space: nowrap; }
.grid { display: grid; gap: 16px; }
.g-3-2 { grid-template-columns: 3fr 2fr; } .g-2-1 { grid-template-columns: 2fr 1fr; } .g-1-1 { grid-template-columns: 1fr 1fr; } .g-1-2 { grid-template-columns: 1fr 2fr; }
.grid > .card { min-width: 0; }
.chart { width: 100%; }
.select.sm, .input.sm { height: 30px; font-size: 13px; }
.icon-btn.xs { width: 24px; height: 24px; border-radius: 5px; }
.link-btn[disabled], .icon-btn[disabled] { opacity: .35; cursor: not-allowed; }

/* ---------- 外壳 ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; }
.side { background: #fbfbfe; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 12px 10px; overflow-y: auto; }
.ws { position: relative; margin-bottom: 10px; }
.ws-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 6px; border-radius: 10px; cursor: pointer; text-align: left; }
.ws-btn:hover { background: #f0f0f7; }
.ws-t { flex: 1; min-width: 0; line-height: 1.3; }
.ws-t b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.ws-t small { font-size: 12px; color: var(--text-3); }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--border-2); }
.nav-i, .pj-i { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; cursor: pointer; }
.nav-i:hover, .pj-i:hover { background: #f0f0f7; color: var(--text); }
.nav-i.active, .pj-i.active { background: var(--primary-1); color: var(--primary); font-weight: 500; }
.nav-i em { margin-left: auto; font-style: normal; font-size: 12px; background: var(--primary-2); color: var(--primary); border-radius: 9px; padding: 0 7px; line-height: 18px; }
.side-sec { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px; font-size: 12px; color: var(--text-3); letter-spacing: .5px; }
.proj-nav { display: flex; flex-direction: column; gap: 2px; }
.pj-sq { width: 20px; height: 20px; border-radius: 6px; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pj-sq.sm { width: 18px; height: 18px; border-radius: 5px; }
.pj-plan { margin-left: auto; font-style: normal; font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; line-height: 16px; }
.side-foot { margin-top: auto; padding-top: 12px; }
.plan-card { display: block; padding: 12px; border-radius: 10px; background: linear-gradient(135deg, #f3f1ff, #eef6ff); border: 1px solid #e6e2ff; color: var(--text); }
.plan-card:hover { color: var(--text); border-color: var(--primary-3); }
.plan-card .progress { margin-top: 8px; height: 5px; }
.plan-card b { color: var(--primary); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--border); }
.menu-toggle { display: none; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); min-width: 0; white-space: nowrap; }
.crumb b { color: var(--text); font-weight: 600; }
.crumb .sep { color: var(--text-4); }
.top-search { position: relative; margin-left: auto; width: 280px; }
.top-search .input { padding-left: 32px; background: var(--fill); border-color: transparent; height: 34px; border-radius: 8px; }
.top-search .input:focus { background: #fff; }
.ts-ic { position: absolute; left: 10px; top: 9px; color: var(--text-3); display: flex; }
.top-search kbd { position: absolute; right: 8px; top: 8px; font-family: inherit; font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; background: #fff; line-height: 16px; }
.ts-drop { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-2); padding: 6px; display: none; z-index: 50; min-width: 360px; }
.ts-drop.open { display: block; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn.has-dot { position: relative; }
.icon-btn.has-dot::after { content: ""; position: absolute; right: 7px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 1.5px solid #fff; }
.me { position: relative; cursor: pointer; display: flex; }
.main-scroll { flex: 1; overflow: auto; min-height: 0; }
.page { padding: 20px 24px 40px; max-width: 1600px; margin: 0 auto; }
.full-view .page { padding-bottom: 0; height: 100%; max-width: none; }
.full-view .main-scroll { overflow: hidden; }
.pg-full { display: flex; flex-direction: column; height: 100%; }

/* 下拉 */
.dropdown { position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-2); padding: 6px; display: none; z-index: 60; }
.dropdown.right { left: auto; right: 0; }
.dropdown.open { display: block; animation: toastIn .15s ease; }
.dd-h { font-size: 12px; color: var(--text-3); padding: 6px 10px; }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text); }
.dd-item:hover { background: var(--fill); }
.dd-item small { display: block; font-size: 12px; color: var(--text-3); }
.dd-item svg[width="30"] { width: 26px; height: 26px; }
.dd-sep { height: 1px; background: var(--border-2); margin: 6px 0; }
.dd-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.dd-me small { display: block; color: var(--text-3); font-size: 12px; }

/* 头像 */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 500; flex-shrink: 0; line-height: 1; }
.av.ring { box-shadow: 0 0 0 2px #fff; }
.av.more { background: #eceef5; color: var(--text-2); font-size: 11px; box-shadow: 0 0 0 2px #fff; }
.av-name { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.av-stack { display: inline-flex; align-items: center; }
.av-stack .av + .av, .av-stack .av + .more { margin-left: -7px; }

/* 状态、优先级、类型 */
.st { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; white-space: nowrap; background: var(--fill); color: var(--text-2); }
.st i { width: 6px; height: 6px; border-radius: 50%; }
.st-primary { background: var(--primary-1); color: var(--primary); }
.st-warning { background: #fef3e2; color: #b45309; }
.st-success { background: #e7f8f1; color: #047857; }
.pri { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pri i { width: 8px; height: 8px; border-radius: 2px; }
.type-ic { display: inline-flex; flex-shrink: 0; }
.pts { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 10px; background: #eef0f7; color: var(--text-2); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.due { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.due.over { color: var(--danger); font-weight: 500; }
.due.soon { color: #d97706; }

/* 统计块 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats.s5 { grid-template-columns: repeat(5, 1fr); margin-top: 16px; }
.stat { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-p { background: var(--primary-1); color: var(--primary); } .stat-b { background: #e8f4fe; color: #0284c7; } .stat-r { background: #fdecec; color: #dc2626; } .stat-g { background: #e7f8f1; color: #059669; } .stat-o { background: #fef3e2; color: #d97706; }
.stat-l { font-size: 13px; color: var(--text-3); }
.stat-v { font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -.3px; }
.stat-s { font-size: 12px; color: var(--text-3); }

/* ---------- 工作台 ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hello h1 { font-size: 22px; font-weight: 600; }
.hello p { color: var(--text-3); margin-top: 4px; }
.hello p b { color: var(--danger); }
.hl { padding: 4px 8px 8px; }
.hl-i { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.hl-i:hover { background: var(--fill); }
.hl-id { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; width: 64px; flex-shrink: 0; }
.hl-t { font-size: 14px; }
.hl-i.done .hl-t { color: var(--text-3); text-decoration: line-through; }
.pj-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-3); white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.pj-dot::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c); flex-shrink: 0; }
.hp { display: flex; gap: 12px; align-items: flex-start; padding: 13px 20px; border-bottom: 1px solid var(--border-2); cursor: pointer; }
.hp:last-child { border-bottom: 0; }
.hp:hover { background: #fafaff; }
.hp .progress { margin-top: 8px; height: 5px; }
.pj-big { width: 40px; height: 40px; border-radius: 11px; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 10px -4px rgba(28, 29, 43, .35); }
.pj-big.sm { width: 32px; height: 32px; border-radius: 9px; }
.feed { padding: 6px 10px; }
.fd { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.fd:hover { background: var(--fill); }

/* ---------- 项目头部 ---------- */
.ph { display: flex; align-items: center; gap: 16px; }
.ph-l { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.ph-t { display: flex; align-items: center; gap: 10px; }
.ph-t h1 { font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.star { color: var(--text-4); } .star:hover { color: #f59e0b; }
.ph-s { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-3); margin-top: 3px; flex-wrap: wrap; }
.ph-s > span + span::before { content: ""; display: inline-block; width: 1px; height: 10px; background: var(--border); margin-right: 14px; vertical-align: -1px; }
.ph-pg { display: inline-flex; align-items: center; gap: 8px; }
.ph-pg .progress { width: 90px; height: 5px; }
.ph-r { display: flex; align-items: center; gap: 12px; }
.vtabs { display: flex; align-items: center; gap: 4px; margin: 14px 0 12px; border-bottom: 1px solid var(--border); }
.vt { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 10px; color: var(--text-2); font-size: 14px; position: relative; }
.vt:hover { color: var(--text); }
.vt.active { color: var(--primary); font-weight: 500; }
.vt.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }

/* ---------- 看板 ---------- */
.bbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bbar .input-icon .input { padding-left: 30px; }
.av-filter { display: flex; align-items: center; padding-left: 4px; }
.avf { border: 0; background: none; padding: 0; margin-left: -6px; cursor: pointer; border-radius: 50%; transition: transform .12s; position: relative; }
.avf:first-child { margin-left: 0; }
.avf:hover { transform: translateY(-2px); z-index: 2; }
.avf.on .av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); z-index: 3; }
.chips { display: flex; gap: 6px; }
.chips .filter-chip { gap: 5px; height: 30px; }
.ck-l { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.sp-mini { margin-bottom: 6px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; }
.sp-mini .ic { color: #f97316; }
.sp-mini span { color: var(--text-3); font-size: 12px; }
.board { flex: 1; min-height: 0; display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; align-items: stretch; }
.col { flex: 1 0 264px; max-width: 380px; background: #eff0f6; border-radius: 12px; display: flex; flex-direction: column; min-height: 0; transition: background .15s, box-shadow .15s; }
.col.over { background: #e9e6fd; box-shadow: inset 0 0 0 2px var(--primary-3); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 14px; font-size: 14px; }
.col-h > i { width: 8px; height: 8px; border-radius: 50%; }
.col-h b { font-weight: 600; }
.col-n { font-size: 12px; color: var(--text-3); background: #fff; border-radius: 9px; padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }
.col-n.over { background: var(--danger-1); color: var(--danger); font-weight: 600; }
.col-p { font-size: 12px; color: var(--text-3); }
.wip-warn { margin: 0 10px 6px; font-size: 12px; color: #b91c1c; background: #fdecec; border-radius: 6px; padding: 4px 8px; display: flex; align-items: center; gap: 4px; }
.col-b { flex: 1; overflow-y: auto; padding: 2px 10px 6px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.col-empty { border: 1.5px dashed #d6d8e4; border-radius: 10px; color: var(--text-3); font-size: 12px; text-align: center; padding: 22px 0; }
.col-add { margin: 2px 10px 10px; border: 0; background: transparent; color: var(--text-3); font-size: 13px; height: 32px; border-radius: 8px; display: flex; align-items: center; gap: 6px; padding: 0 8px; cursor: pointer; }
.col-add:hover { background: #e4e5ee; color: var(--text); }
.kc { background: #fff; border-radius: 10px; padding: 11px 12px 10px; box-shadow: 0 1px 2px rgba(28, 29, 43, .06), 0 0 0 1px rgba(28, 29, 43, .04); cursor: grab; transition: box-shadow .15s, transform .15s; flex-shrink: 0; }
.kc:hover { box-shadow: 0 6px 16px -6px rgba(28, 29, 43, .18), 0 0 0 1px var(--primary-3); }
.kc:active { cursor: grabbing; }
.kc.dragging { opacity: .35; }
.kc.is-over { box-shadow: inset 3px 0 0 var(--danger), 0 1px 2px rgba(28, 29, 43, .06), 0 0 0 1px rgba(28, 29, 43, .04); }
.kc.is-done .kc-t { color: var(--text-3); }
.kc-top { display: flex; align-items: center; gap: 6px; }
.kc-id { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; flex: 1; }
.kc-t { font-size: 14px; line-height: 1.5; margin: 6px 0 8px; color: var(--text); word-break: break-all; }
.kc-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.kt { font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 4px; background: #f1f2f8; color: var(--text-2); }
.kt-w { background: #fef3e2; color: #b45309; }
.kc-f { display: flex; align-items: center; gap: 10px; }
.kc-m { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-3); }
.kc-m.ok { color: var(--success); }
.kc-ph { border-radius: 10px; background: rgba(99, 82, 245, .08); border: 1.5px dashed var(--primary-3); flex-shrink: 0; }
.kc-new { cursor: default; box-shadow: 0 0 0 2px var(--primary-3); }
.kc-new textarea { width: 100%; border: 0; outline: none; resize: none; font-size: 14px; line-height: 1.5; padding: 0; }

/* ---------- 甘特图 ---------- */
.g-legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.g-legend span { display: inline-flex; align-items: center; gap: 5px; }
.g-legend i { width: 14px; height: 8px; border-radius: 3px; display: inline-block; }
.lg-default { background: #cbd2e1; } .lg-primary { background: var(--primary); } .lg-warning { background: #f59e0b; } .lg-success { background: #10b981; }
.lg-over { background: #fff; border: 1.5px solid var(--danger); }
.lg-ms { width: 9px !important; height: 9px !important; background: #f59e0b; transform: rotate(45deg); border-radius: 1px !important; }
.gantt { flex: 1; min-height: 0; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px 12px 0 0; position: relative; }
.g-in { position: relative; }
.g-head { position: sticky; top: 0; z-index: 6; display: flex; background: #fff; border-bottom: 1px solid var(--border); height: 52px; }
.g-lh { position: sticky; left: 0; z-index: 7; background: #fafafd; border-right: 1px solid var(--border); display: flex; align-items: flex-end; padding: 0 16px 9px; font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.g-th { position: relative; flex-shrink: 0; }
.g-months { position: absolute; left: 0; right: 0; top: 0; height: 24px; border-bottom: 1px solid var(--border-2); }
.g-months > div { position: absolute; top: 0; height: 24px; border-left: 1px solid var(--border-2); font-size: 12px; color: var(--text-2); font-weight: 500; }
.g-months span { position: sticky; left: calc(var(--lw) + 12px); padding: 0 8px; line-height: 24px; white-space: nowrap; }
.g-days { position: absolute; left: 0; right: 0; top: 24px; height: 28px; }
.gd { position: absolute; top: 0; height: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--text-2); line-height: 1.1; }
.gd small { font-size: 9px; color: var(--text-3); }
.gd.wk { color: var(--text-4); } .gd.wk small { color: var(--text-4); }
.gd.today span { background: var(--danger); color: #fff; border-radius: 4px; padding: 0 3px; }
.gd.gw { align-items: flex-start; padding-left: 4px; border-left: 1px solid var(--border-2); }
.g-body { position: relative; }
.g-grid { position: absolute; top: 0; bottom: 0; background-image: linear-gradient(to right, #f1f2f7 1px, transparent 1px); }
.g-sh { position: absolute; top: 0; bottom: 0; background: #f8f8fb; }
.g-sh.hol { background: repeating-linear-gradient(135deg, #fffafa 0 5px, #fdf0f0 5px 10px); }
.g-deps { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; }
.g-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--danger); z-index: 3; pointer-events: none; }
.g-today span { white-space: nowrap; position: sticky; top: 56px; display: inline-block; margin-left: -18px; margin-top: 2px; background: var(--danger); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 4px; }
.gr { position: absolute; left: 0; right: 0; height: 38px; border-bottom: 1px solid #f3f4f8; }
.gr:hover { background: rgba(99, 82, 245, .035); }
.gl { position: sticky; left: 0; z-index: 4; width: var(--lw); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 34px; background: #fff; border-right: 1px solid var(--border); font-size: 13px; cursor: pointer; }
.gr:hover .gl { background: #fafaff; }
.gl .ellipsis { flex: 1; min-width: 0; }
.gl-d { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.gr-epic .gl { padding-left: 10px; background: #fafafd; }
.gr-epic .gl b { font-weight: 600; min-width: 0; }
.gr-epic { background: #fcfcfe; }
.gr-ms .gl { padding-left: 12px; background: #fffdf7; }
.gbar { position: absolute; top: 8px; height: 22px; border-radius: 6px; background: #dfe3ee; overflow: visible; cursor: grab; z-index: 3; display: flex; align-items: center; user-select: none; touch-action: none; }
.gbar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.gbar .gb-t { position: relative; font-size: 12px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gb-h { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; border-radius: 0 6px 6px 0; }
.gbar:hover .gb-h { background: rgba(0, 0, 0, .12); }
.gb-default { background: #e6e9f2; } .gb-default .gb-t { color: var(--text-2); }
.gb-primary { background: #d9d4fd; } .gb-primary > i { background: var(--primary); } .gb-primary .gb-t { color: #fff; text-shadow: 0 0 2px rgba(60, 40, 200, .5); }
.gb-warning { background: #fde7c2; } .gb-warning > i { background: #f59e0b; } .gb-warning .gb-t { color: #fff; text-shadow: 0 0 2px rgba(150, 80, 0, .5); }
.gb-success { background: #10b981; } .gb-success > i { background: #10b981; } .gb-success .gb-t { color: #fff; }
.gbar.over { box-shadow: 0 0 0 1.5px var(--danger); }
.gbar.moving { box-shadow: 0 6px 16px rgba(28, 29, 43, .25); cursor: grabbing; z-index: 5; }
.gbar.moving::after { content: attr(data-tip); position: absolute; left: 0; top: -24px; background: #1c1d2b; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.gb-out { position: absolute; top: 10px; font-size: 12px; color: var(--text-2); white-space: nowrap; pointer-events: none; z-index: 2; }
.gbar-epic { position: absolute; top: 13px; height: 12px; background: #d7d9e6; border-radius: 3px; z-index: 3; }
.gbar-epic::before, .gbar-epic::after { content: ""; position: absolute; bottom: -5px; border: 5px solid transparent; border-top-color: #4b5068; }
.gbar-epic::before { left: 0; border-left-color: #4b5068; } .gbar-epic::after { right: 0; border-right-color: #4b5068; }
.gbar-epic > i { display: block; height: 100%; background: #4b5068; border-radius: 3px; }
.gbar-epic span { position: absolute; right: -40px; top: -3px; font-size: 11px; color: var(--text-3); }
.gms { position: absolute; top: 12px; z-index: 3; }
.gms i { position: absolute; left: -7px; top: 0; width: 13px; height: 13px; background: #f59e0b; transform: rotate(45deg); border-radius: 2px; box-shadow: 0 0 0 2px #fff; }
.gms.done i { background: #10b981; }
.gms span { position: absolute; left: 12px; top: -2px; font-size: 12px; color: var(--text-2); white-space: nowrap; background: rgba(255, 253, 247, .9); padding: 0 3px; }

/* ---------- 任务列表 ---------- */
.bulk { display: none; align-items: center; gap: 10px; margin: 0 16px 10px; padding: 8px 12px; background: var(--primary-1); border-radius: 8px; font-size: 13px; }
.bulk.show { display: flex; }
.table.mini { font-size: 12px; }
.table.mini td, .table.mini th { padding: 8px 10px; }

/* ---------- 任务详情 ---------- */
.td { display: grid; grid-template-columns: 1fr 250px; gap: 24px; }
.td-main { min-width: 0; }
.td-title { width: 100%; border: 1px solid transparent; border-radius: 8px; font-size: 20px; font-weight: 600; line-height: 1.4; padding: 4px 8px; margin: -4px -8px 8px; resize: none; outline: none; font-family: inherit; color: var(--text); field-sizing: content; }
.td-title:hover { background: var(--fill); }
.td-title:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-2); }
.td-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--fill); font-size: 12px; color: var(--text-2); }
.tag-chip { background: #f1f2f8; }
.chip-danger { background: var(--danger-1); color: var(--danger); }
.td-td-pri { display: none; }
.td-sec { margin-bottom: 20px; }
.td-h { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.td-bar { width: 120px; display: inline-flex; }
.td-desc { font-size: 14px; line-height: 1.75; color: var(--text-2); padding: 8px 10px; border-radius: 8px; margin: 0 -10px; cursor: text; }
.td-desc:hover { background: var(--fill); }
.subs { display: flex; flex-direction: column; }
.sub { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 14px; cursor: pointer; margin: 0 -8px; }
.sub:hover { background: var(--fill); }
.sub.done span { color: var(--text-3); text-decoration: line-through; }
.sub-add .input { border-style: dashed; margin-top: 6px; height: 32px; }
.td-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border-2); margin-bottom: 14px; }
.td-tabs .tab { padding: 10px 0; }
.cmts { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.cmt { display: flex; gap: 10px; }
.cmt-h { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.cmt-h span { color: var(--text-3); font-size: 12px; }
.cmt-b { font-size: 14px; color: var(--text-2); background: var(--fill); padding: 8px 12px; border-radius: 0 10px 10px 10px; margin-top: 4px; line-height: 1.65; display: inline-block; }
.mention { color: var(--primary); font-weight: 500; }
.cmt-box { display: flex; gap: 10px; }
.empty-s { color: var(--text-3); font-size: 13px; padding: 16px 0; text-align: center; }
.td-side { border-left: 1px solid var(--border-2); padding-left: 20px; }
.td-row { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.td-row .k { width: 52px; font-size: 13px; color: var(--text-3); flex-shrink: 0; }
.td-row .v { flex: 1; min-width: 0; }
.td-row .progress { margin-top: 4px; }
.td-divider { height: 1px; background: var(--border-2); margin: 10px 0; }

/* 通知 */
.seg-line { display: flex; align-items: center; margin-bottom: 12px; }
.noti-i { display: flex; gap: 10px; padding: 12px 10px; border-radius: 8px; cursor: pointer; position: relative; margin: 0 -10px; }
.noti-i:hover { background: var(--fill); }
.noti-i::after { content: ""; position: absolute; right: 10px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.noti-i.read::after { display: none; }

/* ---------- 迭代 ---------- */
.sp-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.sp-t { position: relative; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 7px 14px; cursor: pointer; font-family: inherit; line-height: 1.35; }
.sp-t b { font-size: 13px; font-weight: 600; color: var(--text); }
.sp-t small { font-size: 11px; color: var(--text-3); }
.sp-t:hover { border-color: var(--primary-3); }
.sp-t.active { border-color: var(--primary); background: var(--primary-1); box-shadow: 0 0 0 3px var(--primary-2); }
.sp-t.active b { color: var(--primary); }
.sp-t .live { position: absolute; right: 8px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, .2); }
.sp-t:has(em) { padding-right: 52px; }
.sp-t em { position: absolute; right: 6px; top: 6px; font-style: normal; font-size: 10px; color: var(--text-3); }
.sp-hero { display: flex; gap: 24px; align-items: center; padding: 20px 24px; border-radius: var(--radius); background: linear-gradient(120deg, #2d2476 0%, #4a3bd6 60%, #6352f5 100%); color: #fff; position: relative; overflow: hidden; }
.sp-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%); pointer-events: none; }
.sp-hero h2 { font-size: 20px; }
.sp-hero p { opacity: .82; margin-top: 6px; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.sp-hero .tag { background: rgba(255, 255, 255, .18); color: #fff; }
.sp-hero .tag-warning { background: #fbbf24; color: #3b2a00; }
.sp-prog { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 10px 12px; align-items: center; margin-top: 14px; max-width: 620px; font-size: 12px; }
.sp-prog > div { display: flex; gap: 6px; opacity: .9; white-space: nowrap; }
.sp-prog b { font-weight: 600; }
.sp-prog .progress { background: rgba(255, 255, 255, .2); height: 7px; }
.sp-act { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; position: relative; z-index: 1; }
.sp-act > .btn:not(.btn-primary) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.sp-act > .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }
.sp-act .fs12 { color: rgba(255, 255, 255, .7) !important; }
.sp-act { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: 300px; }
.sp-act .fs12 { width: 100%; text-align: right; }

/* ---------- 工时 ---------- */
.ts-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.ts-head h1 { font-size: 21px; font-weight: 600; }
.ts-head p { font-size: 13px; margin-top: 2px; }
.ts-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.wk-nav { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.wk-t { display: flex; flex-direction: column; align-items: center; padding: 0 12px; line-height: 1.3; min-width: 150px; }
.wk-t b { font-size: 14px; } .wk-t span { font-size: 12px; color: var(--text-3); }
.ts-grid th small { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; }
.ts-grid th.off { color: var(--text-4); }
.ts-grid th.is-today { color: var(--primary); }
.ts-grid td.off { background: #fafafc; }
.ts-grid td.hc { cursor: pointer; width: 64px; }
.ts-grid td.hc:hover { background: var(--primary-1) !important; }
.hv { display: inline-block; min-width: 36px; line-height: 24px; border-radius: 6px; font-weight: 600; font-size: 12px; }
.miss { display: inline-block; font-size: 11px; color: var(--danger); background: var(--danger-1); border-radius: 4px; padding: 0 5px; line-height: 18px; }
.lg-heat { display: inline-flex; align-items: center; gap: 4px; }
.lg-heat i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.log-i { padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.log-i .flex { gap: 8px; }
.log-t { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.my-ring { margin: -10px 0 0; }

/* ---------- 设置 ---------- */
.role-i { padding: 10px 0; border-bottom: 1px dashed var(--border-2); }
.role-i b { font-weight: 600; }
.perm td, .perm th { padding: 9px 10px; }
.plan-hero { border-radius: var(--radius); padding: 22px 24px; color: #fff; background: linear-gradient(140deg, #2d2476, #6352f5); }
.plan-hero small { opacity: .7; }
.plan-hero h2 { font-size: 26px; margin: 2px 0 4px; }
.plan-hero p { opacity: .8; font-size: 13px; margin-bottom: 12px; }
.ph-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: 13px; }
.ph-row span { opacity: .75; } .ph-row b { font-weight: 500; }
.plan-hero .btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.plan-hero .btn-w { background: #fff; color: var(--primary); border-color: #fff; }
.use-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.use { background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.use-v { font-size: 22px; font-weight: 600; }
.use-v small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.plan.cur { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-2); }
.plan b { font-size: 16px; margin-right: 8px; }
.plan-p span { font-size: 26px; font-weight: 600; }
.plan-p small { color: var(--text-3); margin-left: 6px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); flex: 1; }
.plan li { display: flex; gap: 6px; align-items: center; }
.intg { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-2); }
.intg:last-child { border-bottom: 0; }
.intg b { font-weight: 500; }
.intg-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--primary-1); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #d5d8e3; border-radius: 11px; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(16px); }

.demo-badge { right: 16px; bottom: 12px; }
.topbar .demo-badge { position: static; margin-left: auto; flex-shrink: 0; white-space: nowrap; box-shadow: none; background: var(--fill); border-color: transparent; }
.topbar .demo-badge + .top-search { margin-left: 0; }
.plan-meta { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 6px; }
.plan-meta span { white-space: nowrap; }
@media (max-width: 1100px) {
  .topbar .demo-badge { display: none; }
  .main-scroll::before { content: "在线体验 · 演示数据"; display: block; width: max-content; margin: 10px auto -2px; padding: 1px 10px; font-size: 11px; line-height: 18px; color: var(--text-3); background: #fff; border: 1px solid var(--border); border-radius: 10px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .stats.s5 { grid-template-columns: repeat(3, 1fr); }
  .top-search { width: 220px; }
}
@media (max-width: 1100px) {
  .g-3-2, .g-2-1, .g-1-1, .g-1-2 { grid-template-columns: 1fr; }
  .use-grid { grid-template-columns: repeat(2, 1fr); }
  .td { grid-template-columns: 1fr; }
  .td-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border-2); padding-top: 12px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 300; transform: translateX(-100%); transition: transform .25s; }
  .side-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .side-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 299; display: none; }
  .side-open ~ .side-mask { display: block; }
  .menu-toggle { display: inline-flex; }
  .top-search { display: none; }
  .crumb { flex: 1; overflow: hidden; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .page { padding: 14px 12px 40px; }
  .topbar { padding: 0 10px; gap: 8px; }
  #quick-new span { display: none; }
  .ph { flex-wrap: wrap; } .ph-r { display: none; }
  .ph-s > span + span::before { display: none; }
  .vt { padding: 8px 8px 10px; font-size: 13px; }
  .sp-hero { flex-direction: column; align-items: stretch; }
  .sp-act { justify-content: flex-start; max-width: none; }
  .sp-act .fs12 { text-align: left; }
  .sp-prog { grid-template-columns: auto 1fr; }
  .stat-v { font-size: 20px; }
  .use-grid { grid-template-columns: 1fr; }
  .hl-i .pj-dot, .hl-i .st { display: none; }
  .col { flex-basis: 260px; }
  .stats, .stats.s5 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats.s5 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 12px; gap: 10px; }
  .gl-d { display: none; }
  .sp-mini { display: none; }
}

/* 我的任务（跨项目） */
.my-pj { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.my-pc { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--border-2); border-radius: 10px; font-size: 13.5px; text-align: left; cursor: pointer; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.my-pc:hover { border-color: var(--primary-3); }
.my-pc.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-2); }
.my-pc b { font-size: 16px; }
.my-pc em { font-style: normal; font-size: 11px; color: var(--danger); background: var(--danger-1); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.my-pjl { cursor: pointer; max-width: 160px; }
.my-pjl:hover { color: var(--primary); }
@media (max-width: 720px) {
  .my-pj { grid-template-columns: 1fr 1fr; }
  .my-pc { padding: 10px; gap: 8px; font-size: 12.5px; }
}

/* 窄屏：cfg.cards 的表格改为卡片（主列作标题，其余"标签：值"两列） */
@media (max-width: 720px) {
  .dt.dt-cards .dt-scroll { overflow: visible; }
  .dt.dt-cards .table, .dt.dt-cards .table tbody { display: block; }
  .dt.dt-cards .table thead { display: none; }
  .dt.dt-cards .table tbody tr[data-key] { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px 14px; border-bottom: 1px solid var(--border-2); position: relative; }
  .dt.dt-cards .table tbody tr[data-key] td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; background: none; }
  .dt.dt-cards .table tbody tr[data-key] td.dt-main { grid-column: 1 / -1; padding-right: 40px; }
  .dt.dt-cards .table tbody tr[data-key] td[data-l]:not(.dt-main):not(.dt-corner)::before { content: attr(data-l); display: block; font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
  .dt.dt-cards .table tbody tr[data-key] td.dt-corner { position: absolute; right: 14px; top: 14px; }
  .dt.dt-cards .table tbody tr:not([data-key]), .dt.dt-cards .table tbody tr:not([data-key]) td { display: block; }
  .dt.dt-cards .pager { justify-content: center; }
  .dt.dt-cards .my-tt { min-width: 0 !important; padding-right: 64px; }
  .dt.dt-cards .my-tt .cell-main { max-width: none !important; white-space: normal; }
}

/* 窄屏：工时周表按成员成卡片（7 天一行），我的记录成列表 */
@media (max-width: 720px) {
  .ts-grid, .ts-grid tbody { display: block; }
  .ts-grid thead { display: none; }
  .ts-grid tbody tr { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px 4px; padding: 12px 14px; border-bottom: 1px solid var(--border-2); }
  .ts-grid tbody td { display: block; padding: 0; border: 0; min-width: 0; width: auto !important; }
  .ts-grid td.ts-who { grid-column: 1 / -1; }
  .ts-grid td.hc::before { content: attr(data-l); display: block; font-size: 10.5px; color: var(--text-3); margin-bottom: 3px; }
  .ts-grid td.ts-sum { grid-column: 1 / 3; text-align: left; display: flex; align-items: center; gap: 6px; }
  .ts-grid td.ts-sum::before { content: attr(data-l); font-size: 11px; color: var(--text-3); font-weight: 400; }
  .ts-grid td.ts-sat { grid-column: 3 / -1; align-self: center; }
  .dt-scroll:has(> .ts-grid) { overflow: visible; }
  .ts-mine, .ts-mine tbody { display: block; }
  .ts-mine thead { display: none; }
  .ts-mine tbody tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-2); align-items: center; }
  .ts-mine tbody td { display: block; padding: 0; border: 0; min-width: 0; }
  .ts-mine tbody td:nth-child(2), .ts-mine tbody td:nth-child(4) { grid-column: 1 / -1; }
  .ts-mine tbody td:nth-child(2) { order: -1; }
}
@media (max-width: 720px) {
  .dt.dt-cards .table tbody tr[data-key] td.col-check { position: absolute; left: 14px; top: 13px; width: auto; }
  .dt.dt-cards .table tbody tr[data-key]:has(td.col-check) { padding-left: 44px; }
}
/* 项目收藏 */
.star.on { color: #f59e0b; } .star.on svg { fill: currentColor; }
.pj-fav { margin-left: auto; color: #f59e0b; display: inline-flex; flex: none; } .pj-fav svg { fill: currentColor; }
.pj-plan + .pj-fav { margin-left: 4px; }
@media (max-width: 720px) {
  .card-hd { flex-wrap: wrap; row-gap: 6px; }
  .card-hd h3, .card-hd .sub { white-space: nowrap; }
  .card-hd .extra { flex-wrap: wrap; }
  .dt.dt-cards .role-sel { width: 100% !important; }
}
