/* workspace.css — 看板、里程碑、路线图、活动流、趋势图、设置 */
/* ------------------------------------------------------------------ board */

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.board-col {
  background: var(--canvas-subtle); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column; min-height: 160px;
}
.board-col-head {
  display: flex; align-items: center; gap: 7px; padding: 9px 12px;
  border-bottom: 1px solid var(--border-muted); font-size: 12.5px; font-weight: 600;
}
.board-col-head .n { color: var(--fg-subtle); font-weight: 400; }
.board-col-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 90px; flex: 1; }
.board-col.drag-over .board-col-body { background: var(--accent-subtle); border-radius: var(--radius); }
.board-col-body > .btn-block:last-child { margin-top: auto; }

.board-card {
  background: var(--canvas); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 10px; cursor: grab; font-size: 12.5px; position: relative;
}
.board-card:hover { border-color: var(--fg-subtle); }
.board-card.dragging { opacity: 0.4; }
.board-card .t { font-weight: 500; margin-bottom: 6px; line-height: 1.45; padding-right: 22px; }
.board-card .m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.board-card .move-btn {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px;
  display: grid; place-items: center; padding: 0;
  border: none; border-radius: 5px; background: transparent;
  color: var(--fg-subtle); cursor: pointer; opacity: 0.55;
}
.board-card .move-btn:hover { opacity: 1; background: var(--canvas-overlay); color: var(--fg); }
.board-card .move-btn svg { width: 13px; height: 13px; }

/* ------------------------------------------------------------------ milestones */

.ms-card { display: flex; flex-direction: column; }
.ms-card .card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ms-card h3 { margin: 0; font-size: 14px; font-weight: 600; }
.ms-card .desc { color: var(--fg-muted); font-size: 12.5px; margin: 0; }
.ms-card .foot { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: 11.5px; color: var(--fg-subtle); }

/* ------------------------------------------------------------------ roadmap */

.roadmap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--canvas-subtle); }
.road-head { display: flex; border-bottom: 1px solid var(--border); background: var(--canvas-overlay); }
.road-label-col { width: 232px; flex: none; border-right: 1px solid var(--border); }
.road-head .road-label-col { display: flex; align-items: flex-end; padding: 0 12px 7px; font-size: 11.5px; color: var(--fg-muted); }
.road-months { position: relative; flex: 1; height: 46px; }
.road-month {
  position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border);
  font-size: 11px; color: var(--fg-subtle); padding: 8px 0 0 7px; white-space: nowrap;
}
.road-body { display: flex; }
.road-rows { flex: 1; position: relative; }
.road-row { display: flex; border-bottom: 1px solid var(--border-muted); }
.road-row:last-child { border-bottom: none; }
.road-row .road-label-col {
  padding: 10px 12px; display: flex; align-items: center; gap: 8px;
}
.road-row .road-label-col .nm { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.road-track { position: relative; flex: 1; height: 44px; }
.road-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-muted); }
.road-bar {
  position: absolute; top: 13px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; padding: 0 8px; font-size: 10.5px; color: #fff;
  background: linear-gradient(90deg, #2f81f7, #4d8ffb); min-width: 6px;
  overflow: hidden; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.road-bar.closed { background: linear-gradient(90deg, #8957e5, #a371f7); }
.road-bar .bar-progress {
  position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,0.28);
}
.road-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); opacity: .7; z-index: 3; }
.road-today-head {
  position: absolute; bottom: 3px; transform: translateX(-50%);
  font-size: 10px; color: var(--danger); white-space: nowrap;
  padding: 0 4px; background: var(--canvas); border-radius: 3px;
}
.road-empty { padding: 30px; text-align: center; color: var(--fg-muted); font-size: 13px; }
.road-hint { display: none; margin-top: 8px; font-size: 11.5px; color: var(--fg-subtle); text-align: center; }

/* ------------------------------------------------------------------ activity */

.act { display: flex; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border-muted); font-size: 12.5px; }
.act:last-child { border-bottom: none; }
.act .txt { min-width: 0; }
.act .txt .muted { color: var(--fg-muted); }
.act .when { color: var(--fg-subtle); font-size: 11px; margin-top: 1px; }
.act .subj { color: var(--fg); font-weight: 500; }

/* ------------------------------------------------------------------ trend chart */

.trend { display: flex; align-items: flex-end; gap: 4px; height: 116px; padding: 0 2px; }
.trend-day { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.trend-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 100%; }
.trend-bars i { display: block; width: 45%; max-width: 10px; border-radius: 2px 2px 0 0; min-height: 2px; }
.trend-bars i.c { background: var(--accent); }
.trend-bars i.d { background: var(--success); }
.trend-x { font-size: 9.5px; color: var(--fg-subtle); height: 12px; white-space: nowrap; overflow: hidden; }
.legend { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--fg-muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

/* ------------------------------------------------------------------ 联动 */

a.road-label-col { color: inherit; text-decoration: none; }
a.road-label-col:hover { background: var(--canvas-overlay); text-decoration: none; }
a.road-bar, a.road-bar:hover { color: #fff; text-decoration: none; }
a.road-bar:hover { filter: brightness(1.12); }
.ms-card h3 a { color: inherit; text-decoration: none; }
.ms-card h3 a:hover { color: var(--accent-fg); text-decoration: none; }

.focus-ring { animation: focuspulse 2.4s ease; }
@keyframes focuspulse {
  0%, 50% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 7px var(--accent-subtle); }
  100% { box-shadow: 0 0 0 2px transparent, 0 0 0 7px transparent; }
}

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 8px; }
.chip-filter {
  display: inline-flex; align-items: center; gap: 5px; height: 22px;
  padding: 0 4px 0 9px; border-radius: 20px; font-size: 11.5px;
  background: var(--accent-subtle); border: 1px solid rgba(47, 129, 247, 0.4);
  color: var(--accent-fg);
}
.chip-filter b { font-weight: 600; }
.chip-filter button {
  background: none; border: none; color: inherit; cursor: pointer; padding: 0 3px;
  font-size: 13px; line-height: 1; opacity: 0.7; border-radius: 50%;
}
.chip-filter button:hover { opacity: 1; background: rgba(47, 129, 247, 0.2); }

/* ------------------------------------------------------------------ settings */

.setting-row {
  display: flex; align-items: flex-start; gap: 16px; padding: 14px 16px;
  border-bottom: 1px solid var(--border-muted);
}
.setting-row:last-child { border-bottom: none; }
.setting-row .info { flex: 1; min-width: 0; }
.setting-row .info h4 { margin: 0 0 3px; font-size: 13px; font-weight: 600; }
.setting-row .info p { margin: 0; font-size: 12.5px; color: var(--fg-muted); }

.switch {
  position: relative; width: 38px; height: 22px; flex: none;
  border-radius: 20px; background: var(--border); border: none; cursor: pointer;
  transition: background 0.16s; padding: 0;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform 0.16s;
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.switch.on { background: var(--success-emphasis); }
.switch.on::after { transform: translateX(16px); }
.switch:disabled { opacity: 0.45; cursor: not-allowed; }

.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border-muted); }
.member-row:last-child { border-bottom: none; }
.member-row .info { flex: 1; min-width: 0; }
.member-row .nm { font-size: 13px; font-weight: 500; }
.member-row .hd { font-size: 11.5px; color: var(--fg-muted); }

.label-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border-muted); }
.label-row:last-child { border-bottom: none; }
.label-row .grow { flex: 1; }

.danger-zone { border-color: rgba(248, 81, 73, 0.35); }
