/* ══════════════════════════════════════════════════
   iTracker Design System — 標籤（badge：全圓膠囊＋細框＋色點＋中性字）、優先級圖示、計數膠囊
   正本：design-system/components/badge.css（tracker 建置複製到 wwwroot/css/ds/，勿手改產物）。
   v1.0 自 wwwroot/css/site.css 原樣搬入（規則與原相對順序不變）。
   ══════════════════════════════════════════════════ */
/* Badge 色點制：透明底、外框膠囊（細環線）、中性字＋6px 語意色點（2026-10 Linear）*/
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 var(--space-2); border-radius: var(--r-pill);
  font-size: var(--fs-caption); font-weight: 500; color: var(--text-secondary);
  background: transparent; box-shadow: inset 0 0 0 1px var(--ctl-ring);
  white-space: nowrap; line-height: 1.5; box-sizing: border-box;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--neutral-dot); }
/* 非狀態語意的通用色點修飾（如更版公告「新」標記）；狀態/優先/屬性仍走下方對照表 */
.badge-dot--accent  { background: var(--accent); }
.badge-dot--warn    { background: var(--warn); }      /* 待處理（待指派／未啟用／待審核）*/
.badge-dot--success { background: var(--success); }   /* 啟用中 */
/* 角色（管理員／AE／團隊／客戶…）＝淡色文字，不做成標籤（DS v2 定案）*/
.role-text { font-size: var(--fs-caption); color: var(--text-tertiary); white-space: nowrap; flex: none; }
/* 狀態色點：一律吃 --status-* 狀態族色層（tokens/colors.css；2026-10 Linear：灰／琥珀／綠／藍／靛／淡灰）。
   ⚠️ 同一份對照另有 Helpers/StatusPalette.cs 與 site-core.js `_STATUS_DOT`，三處須同步。 */
.status-todo   .badge-dot { background: var(--status-pending); }
.status-doing  .badge-dot { background: var(--status-doing); }
.status-review .badge-dot { background: var(--status-retest); }
.status-deploy .badge-dot { background: var(--status-ready); }
.status-done   .badge-dot { background: var(--status-done); }
.status-other  .badge-dot { background: var(--status-wontdo); }
.status-todo, .status-other { color: var(--text-secondary); }
/* 狀態 icon（linear-ui-unification）：任務狀態＝進度圓 .status-ring（依進度填滿；完成＝實心打勾，不處理＝灰圓）。
   沿用上方狀態→族色 map，改套在 icon 的 color（currentColor）；同 .badge-icon 也用於列點/看板欄點（.ir-dot/.kb-col-dot，族色走外層 inline color）。
   優先/屬性/邀請維持 .badge-dot。備援：密集列辨識度不足→整組改回 .badge-dot markup（一行）。 */
.badge-icon { width: 14px; height: 14px; flex: none; }
/* 進度圓（IconHelper.StatusIcon／site-core.js mxStatusIcon 同一組 markup）：完成的勾吃卡底色反白；
   不吃全站 icon 雙色調填色（下方 svg[stroke] 規則只命中 stroke 屬性在 svg 根的 icon，本 svg 不在其列）。 */
.status-ring .status-ring-tick { stroke: var(--bg-card); fill: none; }
.status-ring .status-tail { display: none; }   /* 喵嗚的貓尾巴款（skin-city.css 打開）；簡潔一律進度圓 */
.status-todo   .badge-icon { color: var(--status-pending); }
.status-doing  .badge-icon { color: var(--status-doing); }
.status-review .badge-icon { color: var(--status-retest); }
.status-deploy .badge-icon { color: var(--status-ready); }
.status-done   .badge-icon { color: var(--status-done); }
.status-other  .badge-icon { color: var(--status-wontdo); }
/* 客戶邀請：待啟用=warn / 待審核=中性 / 已啟用=success */
.invitation-pending .badge-dot { background: var(--warn); }
.invitation-review  .badge-dot { background: var(--neutral-dot); }
.invitation-active  .badge-dot { background: var(--success); }
.invitation-review  { color: var(--text-secondary); }
/* 屬性標籤：膠囊＋族色點（Bug＝危險紅、優化＝資訊藍、其他／未知＝中性灰），字維持中性 */
.type-fix .badge-dot { background: var(--danger); }
.type-opt .badge-dot { background: var(--info); }
/* 優先級圖示 .prio-icon（不是標籤：無框，清單列最前欄／看板卡／優先選單共用）。
   訊號格三格由低到高，data-lv 點亮前 N 格；緊急＝紅色實心方塊＋驚嘆號；無 data-lv＝空佔位。
   markup 雙寫：Helpers/BadgeHelpers.cs PriorityIcon ⇄ site-core.js prioIcon */
.prio-icon {
  display: inline-flex; align-items: flex-end; justify-content: center; gap: 2px;
  width: 14px; height: 14px; flex: none; padding-bottom: 1px; box-sizing: border-box;
}
.prio-icon i { display: block; width: 3px; border-radius: 1px; background-color: var(--border-hover); }
.prio-icon i:nth-child(1) { height: 5px; }
.prio-icon i:nth-child(2) { height: 8px; }
.prio-icon i:nth-child(3) { height: 11px; }
.prio-icon[data-lv="1"] i:nth-child(1),
.prio-icon[data-lv="2"] i:nth-child(-n+2),
.prio-icon[data-lv="3"] i { background-color: var(--text-primary); }   /* layout-refresh：亮格吃主文字色，低優先單格也看得見 */
.prio-icon--urgent {
  flex-direction: column; align-items: center; justify-content: center; gap: 1.5px; padding: 0;
  border-radius: var(--r-xs); background-color: var(--danger-solid);
}
.prio-icon--urgent i { width: 2px; background-color: var(--text-on-solid); }
.prio-icon--urgent i:nth-child(1) { height: 6px; }
.prio-icon--urgent i:nth-child(2) { height: 2px; }
/* 計數小膠囊（分組標題列/列內數量；狀態/屬性標籤走 .badge，勿混用）*/
.counter-badge, .issue-group-count {
  font-size: var(--fs-body); color: var(--text-tertiary);
  background-color: transparent;
  padding: 0; border-radius: var(--r-xs);
  flex-shrink: 0; white-space: nowrap; font-variant-numeric: tabular-nums;
}
