/* ------------------------------------------------------------------
   02-chart.css
   图表组件（柱线、环形、横条、矩阵、甘特等容器与图例）
   ------------------------------------------------------------------ */
/* ---------- 图表 ---------- */
.bars{display:flex;align-items:flex-end;gap:10px;height:140px;padding-top:16px}
.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;justify-content:flex-end;min-width:0}
.bar{width:100%;max-width:40px;background:var(--red);border-radius:2px 2px 0 0;min-height:3px}
.bar.gray{background:#C9CDD4}
.bar .bv{font-size:10.5px;color:var(--muted);margin-bottom:3px;font-family:var(--mono)}
.bar-lb{font-size:10.5px;color:var(--muted-2);margin-top:6px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

/* 图表通用 */
@keyframes chartIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
.chart-anim{animation:chartIn .5s cubic-bezier(.22,.8,.28,1) both}
.chart-legend{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin-bottom:8px}
.chart-legend span{display:inline-flex;align-items:center;gap:5px}
.chart-legend i{width:9px;height:9px;border-radius:2px;display:inline-block}
.chart-legend i.line{height:3px;width:14px;border-radius:2px}
.chart-empty{height:150px;display:grid;place-items:center;color:var(--muted-2);font-size:12px}

/* 面积折线（柱+线组合） */
.area-chart{display:block;width:100%;height:auto}
.area-chart .grid{stroke:var(--line-2);stroke-width:1}
.area-chart .axis-y,.area-chart .axis-x{font-size:14px;fill:#8E9299;font-family:var(--mono)}
.area-chart .bar-new{fill:#E6EAF0}
.area-chart .line-done{fill:none;stroke:var(--red);stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round}
.area-chart .line-new{fill:none;stroke:#B9BEC7;stroke-width:1.5;stroke-dasharray:4 4}
.area-chart .dot{fill:#fff;stroke:var(--red);stroke-width:2}
.area-chart .dot-new{fill:#fff;stroke:#B9BEC7;stroke-width:1.5}
.area-chart .hit{fill:transparent;cursor:pointer}

/* 环形图 */
.donut-wrap{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.donut{position:relative;flex:0 0 148px;width:148px;height:148px}
.donut svg{width:100%;height:100%;transform:rotate(-90deg)}
.donut .ring-bg{fill:none;stroke:#F1F2F4;stroke-width:14}
.donut .ring{fill:none;stroke-width:14;transition:stroke-dasharray .7s cubic-bezier(.22,.8,.28,1)}
.donut-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}
.donut-center b{font-size:24px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.03em}
.donut-center b small{font-size:11px;font-weight:700;color:var(--muted);margin-left:1px}
.donut-center em{font-size:10px;color:var(--muted-2);font-style:normal;margin-top:4px;font-family:var(--mono);letter-spacing:.06em}
.donut-legend{flex:1;min-width:120px;display:flex;flex-direction:column;gap:8px}
.dg-row{display:flex;align-items:center;gap:8px;font-size:12px}
.dg-row i{width:8px;height:8px;border-radius:2px;flex:0 0 8px}
.dg-row .nm{flex:1;color:#555}
.dg-row .vl{font-family:var(--mono);font-weight:800;font-size:12px;font-variant-numeric:tabular-nums}
.dg-row .pc{flex:0 0 42px;text-align:right;font-size:10.5px;color:var(--muted-2);font-family:var(--mono)}

/* 横向堆叠条形图 */
.hbars{padding-top:2px}
.hbar-row{display:flex;align-items:center;gap:9px;padding:5px 0}
.hbar-name{flex:0 0 66px;font-size:11.5px;color:#555;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hbar-track{flex:1;min-width:0;height:16px;background:#F4F5F7;border-radius:3px;overflow:hidden;display:flex}
.hbar-track i{display:block;height:100%;transition:width .6s cubic-bezier(.22,.8,.28,1)}
.hbar-track i.done{background:var(--red)}
.hbar-track i.rest{background:#DCE0E6}
.hbar-val{flex:0 0 58px;text-align:right;font-size:10.5px;color:var(--muted);font-family:var(--mono);font-variant-numeric:tabular-nums}

/* 紧急 × 重要 矩阵 */
.matrix-wrap{display:flex;flex-direction:column;align-items:center;gap:11px}
.matrix{width:100%;max-width:206px;height:auto;display:block}
.matrix .cell{fill:#FAFBFC;stroke:#F0F2F5}
.matrix .axis-line{stroke:#E1E5EA;stroke-width:1}
.matrix .bubble{stroke:#fff;stroke-width:1.5;cursor:pointer;transition:opacity .2s}
.matrix .bubble:hover{opacity:.82}
.matrix .ax-lab{font-size:10.5px;fill:#9A9DA3}
.matrix-side{width:100%;display:flex;flex-direction:column;gap:5px}
.ms-row{display:flex;align-items:center;gap:7px;font-size:11.5px}
.ms-row i{width:7px;height:7px;border-radius:50%;flex:0 0 7px}
.ms-row .nm{flex:1;color:#555}
.ms-row .vl{font-family:var(--mono);font-size:11px;color:var(--ink);font-weight:700}

/* 成员堆叠条 */
.mbar{flex:1;min-width:0;height:8px;border-radius:4px;background:var(--line-2);overflow:hidden;display:flex}
.mbar i{display:block;height:100%}
.mbar i.done{background:var(--red)}
.mbar i.doing{background:var(--orange)}
.mbar i.pending{background:#D3D7DE}
.mbar-legend{display:flex;gap:12px;font-size:10.5px;color:var(--muted-2);padding:2px 16px 10px}
