/* ============================================
   Team Cards (Teams-Only View)
   ============================================ */
.org-node.team-card {
  min-width: 300px;
  max-width: 340px;
  padding: 0;
  overflow: visible;
  background: var(--color-surface);
  border: 2px solid var(--color-gray-80);
  border-radius: 4px 12px 10px 8px;
  box-shadow:
    3px 3px 0 0 var(--color-gray-80),
    2px 2px 0 0 var(--color-gray-80);
}

/* Override the left accent stripe from .org-node::before */
.org-node.team-card::before {
  display: none;
}

.team-card-header {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--color-primary);
  border-radius: 2px 10px 0 0;
}

.team-card-header + .team-card-header {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   Compact Dense Card — Leads List
   ============================================ */
.tc-leads {
  display: flex;
  flex-direction: column;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-gray-20);
}

.tc-person {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  min-width: 0;
  transition: background 0.1s;
}


.tc-person:hover {
  background: var(--color-gray-10);
}

.tc-person-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--color-gray-20);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: default;
}

.tc-person-avatar:hover {
  transform: scale(1.15);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.tc-person-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-10);
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 700;
}

.tc-person-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.tc-person-role {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.tc-person-role--lead {
  background: #dbeafe;
  color: #1e40af;
}

.tc-person-role--pm {
  background: #fae8ff;
  color: #86198f;
}

.tc-person-role--designer {
  background: #dcfce7;
  color: #15803d;
}

.tc-person--empty {
  opacity: 0.35;
}

.tc-person--empty .tc-person-avatar {
  border-style: dashed;
}

.tc-person--empty .tc-person-name {
  font-style: italic;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* ============================================
   Compact Dense Card — Members List
   ============================================ */
.tc-members {
  display: flex;
  flex-direction: column;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-gray-20);
}

.tc-member {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 3px var(--space-md);
  min-width: 0;
  transition: background 0.1s;
}


.tc-member:hover {
  background: var(--color-gray-10);
}

.tc-member-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--color-gray-20);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: default;
}

.tc-member-avatar:hover {
  transform: scale(1.2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.tc-member-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-10);
  color: var(--color-text-muted);
  font-size: 9px;
  font-weight: 700;
}

.tc-member-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.tc-member-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0 4px;
  border-radius: 2px;
  flex-shrink: 0;
  line-height: 1.5;
}

.tc-member-badge--dev {
  background: var(--color-gray-10);
  color: var(--color-text-muted);
}

.tc-member-badge--qa {
  background: var(--color-warning-bg, #fef3c7);
  color: #9a6700;
}

.tc-member-badge--open {
  background: var(--color-warning-bg, #fef3c7);
  color: #9a6700;
}

.tc-member--open {
  opacity: 0.6;
}

.tc-member-avatar--open {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-10);
  color: var(--color-text-muted);
  font-size: 9px;
  font-weight: 700;
  border-style: dashed;
}

.tc-member--open .tc-member-name {
  font-style: italic;
}

/* ============================================
   Compact Dense Card — Stats Row
   ============================================ */
.tc-stats-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-gray-20);
  background: var(--color-gray-10);
  text-decoration: none;
  transition: background 0.15s;
}

a.tc-stats-row:hover {
  background: var(--color-gray-10);
}

.tc-stat {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.tc-stat strong {
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ============================================
   Compact Dense Card — Collapsible Groups
   ============================================ */
.tc-group {
  border-bottom: 1px solid var(--color-gray-20);
}

.tc-group:last-child {
  border-bottom: none;
}

.tc-group-hdr {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.tc-group-hdr::-webkit-details-marker {
  display: none;
}

.tc-group-hdr::marker {
  content: "";
}

.tc-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--color-text-muted);
}

.tc-group-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-gray-15, var(--color-gray-20));
  padding: 0 5px;
  border-radius: 8px;
  line-height: 1.5;
}

.tc-group-arrow {
  font-size: 8px;
  color: var(--color-text-muted);
  margin-left: auto;
  transition: transform 0.15s;
}

.tc-group:not([open]) .tc-group-arrow {
  transform: rotate(-90deg);
}

.tc-group-hdr:hover {
  background: var(--color-gray-10);
}

.tc-goal-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-md) var(--space-sm);
}

.tc-goal {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 2px 0;
}

.tc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tc-dot--done {
  background: #22c55e;
}

.tc-dot--wip {
  background: #eab308;
}

.tc-dot--todo {
  background: var(--color-gray-30);
}

.tc-goal-name {
  font-size: 11px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  text-decoration: none;
}

a.tc-goal-name:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.tc-goal--done .tc-goal-name {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.tc-goal--cancelled .tc-goal-name {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.tc-dot--cancelled {
  background: var(--color-gray-40);
}

.tc-item-status {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 9px;
  line-height: 1.2;
}

/* AI usage badge in team header */
.team-card-header-ai-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

/* GitHub PR icon links — hidden until row hover */
.gh-pr-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.tc-person:hover .gh-pr-icon {
  opacity: 0.5;
}

.gh-pr-icon:hover {
  opacity: 1 !important;
  color: var(--color-primary);
}

.gh-pr-icon-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin-left: 2px;
}

.gh-pr-icon-group .gh-pr-icon {
  margin-left: -4px;
  opacity: 0.6;
}

.gh-pr-icon-group .gh-pr-icon:first-child {
  margin-left: 0;
}

.gh-pr-icon-group .gh-pr-icon:hover {
  opacity: 1 !important;
  z-index: 10;
  transform: scale(1.2);
}

/* Floating action icons position adjustment for wider card */
.org-node.team-card .node-float-add {
  top: 8px;
  right: -10px;
}

.org-node.team-card .node-float-peer {
  top: 50%;
  right: -10px;
}

.org-node.team-card .node-float-focus {
  bottom: 8px;
  right: -10px;
}

/* Toggle button sits below the card as usual */
.org-node.team-card .node-toggle {
  bottom: -12px;
}


/* Team Color Swatch (inline table dot) */
.team-color-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: var(--space-xs);
  flex-shrink: 0;
}

.teams-member-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-left: 4px;
  flex-shrink: 0;
}

.teams-table-empty {
  color: var(--color-gray-40);
}

/* ============================================
   Teams Board (canvas with pan & zoom)
   ============================================ */
#teams-board {
  flex: 1;
  overflow: auto;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

#teams-board::-webkit-scrollbar {
  display: none;
}

#teams-board.is-panning {
  cursor: grabbing;
}

.teams-board-canvas {
  position: relative;
  min-height: 100%;
  min-width: 100%;
  transform-origin: top left;
}

.teams-board-canvas .org-node.team-card {
  position: absolute;
  cursor: default;
  width: 340px;
  min-width: 340px;
  max-width: 340px;
}

.teams-board-canvas .org-node.team-card.dragging {
  opacity: 0.85;
  z-index: 100;
  box-shadow:
    6px 6px 0 0 var(--color-gray-80),
    5px 5px 0 0 var(--color-gray-80);
}

.teams-board-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  width: 100%;
  color: var(--color-text-muted);
  font-size: 15px;
}


/* ============================================
   Open Positions / Headcount
   ============================================ */
.open-positions-summary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
  background: var(--color-gray-10);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.summary-total {
  font-weight: 700;
  color: var(--color-text-primary);
}

.summary-separator {
  color: var(--color-gray-40);
}

.status-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: var(--space-xs);
  vertical-align: middle;
}

.status-label.unfilled {
  background: var(--color-warning-bg);
  color: #9a6700;
}

.status-label.placeholder {
  background: var(--color-gray-10);
  color: var(--color-gray-60);
}

.text-muted {
  color: var(--color-text-muted);
}

.open-position-link {
  color: var(--color-text-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-gray-40);
}

.open-position-link:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}


/* ============================================
   Team Show Page
   ============================================ */
.team-show-container {
  max-width: 1100px;
}

.team-show-panel {
  max-height: none;
}

.team-show-back {
  display: inline-block;
  margin-bottom: var(--space-sm);
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
}

.team-show-back:hover {
  color: var(--color-text-primary);
}

/* Header with color accent bar */
.team-show-header {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-lg);
}

.team-show-accent {
  width: 6px;
  flex-shrink: 0;
  border-radius: 3px;
}

.team-show-header-content {
  flex: 1;
  padding-left: var(--space-md);
}

.team-show-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.team-show-title-row h1 {
  margin: 0;
  font-size: 22px;
}

/* Role holders row */
.team-show-roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.team-show-roster {
  margin-top: var(--space-sm);
}

.team-show-role {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: var(--space-md);
  background: var(--color-gray-5);
  border: 2px solid var(--color-gray-30);
  border-radius: var(--radius-md);
}

.team-show-role-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.team-show-role-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.team-show-role-title {
  font-size: 12px;
  color: var(--color-text-muted);
}

.team-show-role-unassigned {
  font-size: 12px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Show role hover reveals PR icon */
.team-show-role:hover .gh-pr-icon {
  opacity: 0.5;
}

/* Jira two-column layout */
.team-show-jira-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.team-show-jira-col {
  min-width: 0;
  overflow: hidden;
}

.team-show-jira-col h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 var(--space-sm) 0;
}

.team-show-jira-count {
  display: inline-block;
  background: var(--color-gray-20);
  color: var(--color-text-secondary);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Jira backlog-style item list */
.team-show-item-list {
  border: 1px solid var(--color-gray-20);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.team-show-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-gray-10);
  font-size: 12px;
  line-height: 1.4;
  transition: background 0.1s;
  cursor: default;
}

.team-show-item:last-child {
  border-bottom: none;
}

.team-show-item:hover {
  background: var(--color-gray-10);
}

.team-show-item-key {
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.team-show-item-key--idea {
  color: var(--color-primary);
}

.team-show-item-key--release {
  color: var(--color-success);
}

a.team-show-item-key:hover {
  text-decoration: underline;
}

.team-show-item-summary {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-primary);
}

.team-show-item-date {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Members section */
.team-show-members-section {
  overflow-x: auto;
}

.team-show-members-section h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 var(--space-sm) 0;
}

.team-show-members-table .gh-pr-icon {
  opacity: 0;
}

.team-show-members-table tr:hover .gh-pr-icon {
  opacity: 0.5;
}

.team-show-person-cell {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
}

.team-show-person-name {
  font-weight: 600;
  font-size: 13px;
}

.team-show-person-title {
  font-size: 12px;
  color: var(--color-text-secondary);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-show-lines-cell {
  min-width: 160px;
}

.member-lines-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.member-lines-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-lines-track {
  flex: 1;
  height: 6px;
  background: var(--color-gray-10);
  border-radius: 3px;
  overflow: hidden;
}

.member-lines-fill {
  height: 100%;
  border-radius: 3px;
  min-width: 2px;
}

.member-lines-fill--shipped {
  background: var(--color-primary);
}

.member-lines-fill--ai {
  background: #f59e0b;
}

.member-lines-value {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: right;
}

.team-show-timeline-cell {
  min-width: 210px;
}

/* SVG sparkline styles */
.usage-timeline-svg {
  display: block;
}

.usage-timeline-bar {
  fill: var(--color-primary);
  opacity: 0.7;
}

.usage-timeline-bar:hover {
  opacity: 1;
}

/* Sparkline wrapper */
.usage-timeline-wrap {
  cursor: pointer;
}

/* Expanded timeline popover */
.usage-timeline-popover {
  display: none;
  position: fixed;
  z-index: 9999;
  flex-direction: column;
  gap: var(--space-sm);
  width: 480px;
  background: var(--color-surface);
  border: var(--border-hand-drawn);
  border-radius: var(--radius-hand-drawn-tooltip);
  box-shadow: var(--shadow-hand-drawn-lg);
  padding: var(--space-md);
  pointer-events: none;
}

.utp-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.utp-header strong {
  font-size: 13px;
  color: var(--color-text-primary);
}

.utp-svg {
  display: block;
}

.utp-bar {
  fill: var(--color-primary);
  opacity: 0.7;
}

.utp-month {
  font-size: 10px;
  fill: var(--color-text-muted);
}

.utp-max {
  font-size: 10px;
  fill: var(--color-text-muted);
}

.utp-grid {
  stroke: var(--color-gray-20);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}

.utp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-md);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--color-gray-20);
  font-size: 11px;
  color: var(--color-text-secondary);
}

.utp-stat strong {
  font-weight: 700;
  color: var(--color-text-primary);
}

/* Card header link */
.team-card-header-link {
  color: white;
  text-decoration: none;
}

.team-card-header-link:hover {
  text-decoration: underline;
}

/* Table view team name link */
.team-show-link {
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 600;
}

.team-show-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ============================================
   Repository Activity Chart
   ============================================ */
.repo-activity-section {
  margin-bottom: var(--space-lg);
}

.repo-activity-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 var(--space-sm) 0;
}

.repo-activity-layout {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.repo-activity-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
}

.repo-activity-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-gray-10);
  border: 1px solid var(--color-gray-20);
  border-radius: var(--radius-sm);
}

.repo-activity-card--lines {
  grid-column: 1 / -1;
  gap: var(--space-xs);
}

.repo-activity-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.repo-activity-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.repo-activity-stat-avg {
  font-size: 11px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.repo-activity-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.repo-activity-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.repo-activity-bar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 52px;
  flex-shrink: 0;
  text-align: right;
}

.repo-activity-bar-track {
  flex: 1;
  height: 10px;
  background: var(--color-gray-10);
  border-radius: 5px;
  overflow: hidden;
}

.repo-activity-bar-fill {
  height: 100%;
  border-radius: 5px;
  min-width: 4px;
  transition: width 0.3s;
}

.repo-activity-bar-fill--shipped {
  background: var(--color-primary);
}

.repo-activity-bar-fill--ai {
  background: #f59e0b;
}

.repo-activity-bar-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  min-width: 48px;
}

.repo-activity-pie-wrap {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  flex-shrink: 0;
}

.repo-activity-pie {
  flex-shrink: 0;
  overflow: visible;
}

.repo-activity-slice {
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}

.repo-activity-slice:hover {
  opacity: 1;
  transform: scale(1.06);
  filter: brightness(1.1);
}

.repo-activity-hole {
  pointer-events: none;
}

/* Hover labels in donut center */
.repo-activity-slice-name,
.repo-activity-slice-count {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.repo-activity-slice-name {
  font-size: 9px;
  font-weight: 600;
  fill: var(--color-text-secondary);
}

.repo-activity-slice-count {
  font-size: 12px;
  font-weight: 700;
  fill: var(--color-text-primary);
}

.repo-activity-slice:hover ~ .repo-activity-slice-name,
.repo-activity-slice:hover ~ .repo-activity-slice-count {
  opacity: 1;
}

.repo-activity-total {
  font-size: 13px;
  font-weight: 700;
  fill: var(--color-text-primary);
  pointer-events: none;
  transition: opacity 0.15s;
}

.repo-activity-pie:has(.repo-activity-slice:hover) .repo-activity-total {
  opacity: 0;
}

.repo-activity-details {
  align-self: center;
}

.repo-activity-toggle {
  font-size: 12px;
  color: var(--color-text-muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.repo-activity-toggle::-webkit-details-marker {
  display: none;
}

.repo-activity-toggle::marker {
  content: "";
}

.repo-activity-toggle::before {
  content: "\25B6";
  font-size: 8px;
  margin-right: 4px;
  display: inline-block;
  transition: transform 0.15s;
}

.repo-activity-details[open] .repo-activity-toggle::before {
  transform: rotate(90deg);
}

.repo-activity-toggle:hover {
  color: var(--color-primary);
}

.repo-activity-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: var(--space-sm);
}

.repo-activity-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.3;
}

.repo-activity-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.repo-activity-legend-name {
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.repo-activity-legend-count {
  font-weight: 700;
  color: var(--color-text-primary);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* --- Time Off / OOO --- */

.team-show-avatar-wrap {
  position: relative;
  display: inline-block;
}

.team-show-avatar--ooo {
  opacity: 0.6;
}

.team-show-ooo-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 8px;
  font-weight: 700;
  background: #e55;
  color: #fff;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.team-show-ooo-section {
  margin-bottom: 16px;
}

.team-show-ooo-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.badge--ooo {
  background: #f0e6ff;
  color: #6b3fa0;
}

.badge--ooo-now {
  background: #e55;
  color: #fff;
}

/* --- Time Off Timeline --- */

.tl-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border, #e2e5e9);
  border-radius: 8px;
  font-size: 12px;
}

.tl-row:first-child .tl-label,
.tl-row:first-child .tl-track {
  border-top-left-radius: 8px;
  border-top-right-radius: 0;
}

.tl-row:first-child .tl-track {
  border-top-right-radius: 8px;
  border-top-left-radius: 0;
}

.tl-row:last-child .tl-label {
  border-bottom-left-radius: 8px;
}

.tl-row:last-child .tl-track {
  border-bottom-right-radius: 8px;
}

.tl-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--color-border-light, #f0f1f3);
}

.tl-row:last-child {
  border-bottom: none;
}

.tl-row--header {
  background: var(--color-bg-secondary, #f8f9fa);
  border-bottom: 1px solid var(--color-border, #e2e5e9);
}

.tl-label {
  width: 90px;
  min-width: 90px;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid var(--color-border-light, #f0f1f3);
  display: flex;
  align-items: center;
}

.tl-row--header .tl-label {
  visibility: hidden;
}

.tl-track {
  flex: 1;
  position: relative;
  min-height: 28px;
}

.tl-month {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-right: 1px solid var(--color-border-light, #f0f1f3);
  box-sizing: border-box;
}

.tl-month:last-child {
  border-right: none;
}

.tl-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border-light, #f0f1f3);
  pointer-events: none;
}

.tl-bar-wrap {
  position: absolute;
  top: 0;
  height: 100%;
  z-index: 1;
  cursor: default;
}

.tl-bar {
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 18px;
  border-radius: 4px;
  background: #c9b8f0;
  min-width: 4px;
}

.tl-bar--current {
  background: #e55;
}

.tl-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface, #fff);
  border: var(--border-hand-drawn, 1px solid #ddd);
  border-radius: var(--radius-hand-drawn-tooltip, 8px);
  box-shadow: var(--shadow-hand-drawn-lg, 0 4px 12px rgba(0,0,0,.12));
  padding: 8px 12px;
  white-space: nowrap;
  z-index: 300;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.tl-bar-wrap:hover .tl-tip {
  display: flex;
}

.tl-tip strong {
  font-size: 13px;
  color: var(--color-text-primary, #1a1a1a);
}

.tl-tip-category {
  font-size: 11px;
  font-weight: 600;
  color: #6b3fa0;
}

.tl-tip-dates {
  font-size: 12px;
  color: var(--color-text-secondary, #666);
  font-variant-numeric: tabular-nums;
}

.tl-tip-duration {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-primary, #1a1a1a);
}

.tl-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e55;
  z-index: 2;
  pointer-events: none;
  opacity: 0.7;
}

.tl-label-link {
  color: var(--color-primary, #4a6cf7);
  text-decoration: none;
  font-size: 11px;
}

.tl-label-link:hover {
  text-decoration: underline;
}

/* Status-colored bars for releases */
.tl-bar--done {
  background: #4ade80;
}

.tl-bar--wip {
  background: #60a5fa;
}

.tl-bar--todo {
  background: #d1d5db;
}

.tl-bar--cancelled {
  background: #fca5a5;
  opacity: 0.6;
}

/* Dot markers for point-in-time events */
.tl-dot-wrap {
  position: absolute;
  top: 0;
  height: 100%;
  width: 0;
  z-index: 1;
  cursor: default;
}

.tl-dot {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1);
}

.tl-dot--done { background: #4ade80; }
.tl-dot--wip { background: #60a5fa; }
.tl-dot--todo { background: #d1d5db; }
.tl-dot--cancelled { background: #fca5a5; }

.tl-dot-wrap:hover .tl-tip {
  display: flex;
}

.tl-tip-key {
  font-size: 11px;
  color: var(--color-primary, #4a6cf7);
  font-family: "SF Mono", "Fira Code", monospace;
}

