:root {
  --bg-app: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2128;
  --bg-subtle: #21262d;
  --border-color: #30363d;
  --border-focus: #58a6ff;

  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  --accent-gitlab: #fc6d26;
  --accent-gitlab-subtle: rgba(252, 109, 38, 0.15);
  --accent-jira: #0052cc;
  --accent-jira-light: #2684ff;
  --accent-jira-subtle: rgba(38, 132, 255, 0.15);

  --accent-success: #238636;
  --accent-success-bright: #3fb950;
  --accent-warning: #d29922;
  --accent-warning-bright: #e3b341;
  --accent-purple: #a371f7;
  --accent-blue: #58a6ff;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.icon-gitlab { color: var(--accent-gitlab); }
.icon-jira { color: var(--accent-jira-light); }
.brand-divider { color: var(--text-muted); font-size: 0.8rem; }

.brand-title h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-pill {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background-color: var(--bg-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.nav-controls {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.control-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.select-input, .text-input {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
  min-width: 220px;
}

.select-input:focus, .text-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

/* Global Team Filter Bar & Multi-Select Dropdown */
.global-team-bar {
  background: #11161d;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  position: relative;
  z-index: 50;
}

.team-bar-container {
  max-width: 1360px;
  margin: 0 auto;
}

.team-bar-main-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Team Dropdown Trigger */
.team-dropdown-container {
  position: relative;
}

.team-dropdown-trigger {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.team-dropdown-trigger:hover, .team-dropdown-trigger.expanded {
  background: var(--bg-card-hover);
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.trigger-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.team-summary-badge {
  background: var(--bg-subtle);
  color: #79c0ff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(88, 166, 255, 0.2);
}

.dropdown-arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.team-dropdown-trigger.expanded .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu Box */
.team-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  max-width: 90vw;
  background: #161b22;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 150;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.team-dropdown-header {
  width: 100%;
}

.team-search-input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  outline: none;
}

.team-search-input:focus {
  border-color: var(--border-focus);
}

.team-dropdown-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.team-quick-action-btn {
  background: none;
  border: none;
  color: #79c0ff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.team-quick-action-btn:hover {
  background: rgba(88, 166, 255, 0.15);
  color: #fff;
}

.team-options-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Team Dropdown Checkbox Option Item */
.team-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.team-option-item:hover {
  background: var(--bg-subtle);
}

.team-option-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.team-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #1f6feb;
  cursor: pointer;
}

.team-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.team-option-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.team-option-count {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
}

/* Selected Active Teams Display Row */
.selected-teams-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
}

.selected-team-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  transition: all 0.2s ease;
  user-select: none;
}

.selected-team-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.selected-team-pill .pill-remove {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.9rem;
  line-height: 1;
  transition: opacity 0.15s ease;
}

.selected-team-pill .pill-remove:hover {
  opacity: 1;
}

.all-teams-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.25);
  color: #79c0ff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(180deg, #2ea043 0%, #238636 100%);
  color: #fff;
  border-color: rgba(240, 246, 252, 0.1);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #3fb950 0%, #2ea043 100%);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

/* States */
.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-top: 2rem;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(88, 166, 255, 0.15);
  border-top-color: var(--blue, #58a6ff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.25rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.state-card p {
  color: var(--text-secondary);
  max-width: 500px;
}

.hidden { display: none !important; }

/* Lifecycle Grid (Fork Card + Merge Status Card) */
.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.fork-card {
  background: linear-gradient(135deg, #161b22 0%, #1a2332 100%);
  border: 1px solid #1f6feb;
  position: relative;
  overflow: hidden;
}

.fork-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #58a6ff 0%, #1f6feb 100%);
}

.merge-status-card {
  background: linear-gradient(135deg, #161b22 0%, #1e2820 100%);
  border: 1px solid #238636;
  position: relative;
  overflow: hidden;
}

.merge-status-card.is-active {
  background: linear-gradient(135deg, #161b22 0%, #2a2214 100%);
  border-color: #d29922;
}

.merge-status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #3fb950 0%, #238636 100%);
}

.merge-status-card.is-active::before {
  background: linear-gradient(180deg, #e3b341 0%, #d29922 100%);
}

.fork-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.fork-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(88, 166, 255, 0.15);
  color: #79c0ff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.merge-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(63, 185, 80, 0.15);
  color: #56d364;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.is-active .merge-badge {
  background: rgba(227, 179, 65, 0.15);
  color: #e3b341;
}

.pulse-dot, .merge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pulse-dot {
  background-color: #58a6ff;
  animation: pulse 2s infinite;
}

.merge-dot { background-color: #3fb950; }

.is-active .merge-dot {
  background-color: #e3b341;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(88, 166, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(88, 166, 255, 0); }
}

.timestamp {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.fork-body {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.commit-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
}

.commit-pill .label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.commit-pill code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: #58a6ff;
}

.fork-message-wrapper { flex: 1; }

.fork-message-wrapper h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.fork-author-row {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fork-author-row strong { color: var(--text-primary); }
.bullet { color: var(--text-muted); }

.fork-helper {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(88, 166, 255, 0.15);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
}

.stat-icon {
  font-size: 1.8rem;
  background: var(--bg-subtle);
  padding: 0.65rem;
  border-radius: var(--radius-md);
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  font-family: var(--font-mono);
}

.accent-release .stat-value { color: #f0883e; }
.accent-develop .stat-value { color: #3fb950; }
.accent-jira .stat-value { color: #58a6ff; }
.accent-mrs .stat-value { color: #a371f7; }

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Branch Divergence Section */
.branch-flow-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.flow-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title-row h3 { font-size: 1.1rem; font-weight: 700; }

.flow-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: #79c0ff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-toggle-btn:hover {
  background: rgba(38, 132, 255, 0.15);
  border-color: #58a6ff;
  color: #fff;
}

.toggle-arrow {
  font-size: 0.65rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.flow-toggle-btn.expanded .toggle-arrow {
  transform: rotate(180deg);
}

.flow-toggle-btn.expanded {
  background: rgba(38, 132, 255, 0.2);
  border-color: #58a6ff;
  color: #fff;
}

/* Collapsible Lifecycle Details Drawer */
.flow-lifecycle-drawer {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, margin-top 0.35s ease, transform 0.35s ease;
}

.flow-lifecycle-drawer.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.flow-lifecycle-drawer:not(.collapsed) {
  max-height: 800px;
  opacity: 1;
  margin-top: 1.5rem;
  transform: translateY(0);
  border-top: 1px dashed var(--border-color);
  padding-top: 1.25rem;
}

.tag-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  color: var(--text-secondary);
}

.divergence-tree {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0.5rem;
}

.tree-node {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-width: 200px;
}

.tree-base {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.08);
}

.tree-merge {
  border-color: #238636;
  background: rgba(35, 134, 54, 0.08);
}

.node-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #58a6ff;
  margin-bottom: 0.25rem;
}

.tree-merge .node-badge { color: #3fb950; }

.node-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.node-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.tree-split-connector {
  position: relative;
  width: 40px;
  height: 180px;
}

.tree-split-connector::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 2px;
  background: var(--border-color);
}

.tree-split-connector::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 25%;
  bottom: 25%;
  width: 2px;
  background: var(--border-color);
}

.split-line-top {
  position: absolute;
  left: 20px;
  top: 25%;
  width: 20px;
  height: 2px;
  background: #f0883e;
}

.split-line-bottom {
  position: absolute;
  left: 20px;
  bottom: 25%;
  width: 2px;
  height: 2px;
  background: #3fb950;
}

.tree-paths {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.tree-path-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.path-release { border-left: 3px solid #f0883e; }
.path-develop { border-left: 3px solid #3fb950; }

.path-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.branch-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.release-tag { color: #f0883e; }
.develop-tag { color: #3fb950; }

.badge {
  font-size: 0.75rem;
  background: var(--bg-card);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  color: var(--text-secondary);
}

.path-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.sample-commits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sample-commit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sample-commit-chip code {
  color: #58a6ff;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Primary Tabs Bar */
.primary-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.primary-tabs .tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.primary-tabs .tab-btn:hover { color: var(--text-primary); }

.primary-tabs .tab-btn.active {
  color: #58a6ff;
  border-bottom-color: #58a6ff;
}

.tab-badge {
  font-size: 0.75rem;
  background: var(--bg-subtle);
  color: var(--text-primary);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.tab-pane { display: none; }

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sub-tabs bar within each main tab */
.sub-tabs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.sub-tabs-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.sub-tab-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.sub-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.sub-tab-btn.active {
  background: #1f6feb;
  color: #fff;
  border-color: #1f6feb;
  box-shadow: 0 0 0 1px #58a6ff;
}

.sub-badge {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
}

.badge-orange { background: #f0883e !important; color: #000 !important; font-weight: 700; }
.badge-blue { background: #58a6ff !important; color: #000 !important; font-weight: 700; }
.badge-green { background: #3fb950 !important; color: #000 !important; font-weight: 700; }
.badge-purple { background: #a371f7 !important; color: #fff !important; font-weight: 700; }

.subtab-description-box {
  background: rgba(88, 166, 255, 0.05);
  border: 1px solid rgba(88, 166, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: #79c0ff;
  margin-bottom: 1.25rem;
}

.pane-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ticket-status-filters, .ticket-filters {
  display: flex;
  gap: 0.4rem;
}

.filter-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover, .filter-chip.active {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.search-input {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  min-width: 220px;
}

.search-input:focus { border-color: var(--border-focus); }

/* Commits List & MR List */
.commits-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.commit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.commit-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.commit-card.is-release-fix { border-left: 3px solid #f0883e; }
.commit-card.is-fork-point {
  border-left: 3px solid #58a6ff;
  background: rgba(88, 166, 255, 0.05);
}

.commit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.commit-hash-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.commit-hash-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: #58a6ff;
  text-decoration: none;
  background: var(--bg-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.commit-hash-link:hover { text-decoration: underline; }

.commit-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.commit-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.commit-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.4rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ticket-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ticket-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(38, 132, 255, 0.15);
  border: 1px solid rgba(38, 132, 255, 0.3);
  color: #79c0ff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ticket-pill:hover {
  background: rgba(38, 132, 255, 0.25);
  border-color: #58a6ff;
}

.team-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(163, 113, 247, 0.15);
  border: 1px solid rgba(163, 113, 247, 0.3);
  color: #d2a8ff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* Jira Tickets Grid */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}

.ticket-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}

.ticket-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.ticket-key-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: #58a6ff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ticket-key-link:hover { text-decoration: underline; }

.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  white-space: nowrap;
}

.status-done {
  background: rgba(35, 134, 54, 0.2);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.status-in-progress, .status-indeterminate {
  background: rgba(210, 153, 34, 0.2);
  color: #e3b341;
  border: 1px solid rgba(227, 179, 65, 0.3);
}

.status-to-do, .status-new {
  background: rgba(110, 118, 129, 0.2);
  color: #8b949e;
  border: 1px solid rgba(139, 148, 158, 0.3);
}

.ticket-summary {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.ticket-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.ticket-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.ticket-done-date {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: #3fb950;
  background: rgba(46, 160, 67, 0.12);
  border: 1px solid rgba(46, 160, 67, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  white-space: nowrap;
}

.ticket-parent {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.ticket-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.assignee-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.assignee-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

/* Changelog Output */
.changelog-actions {
  display: flex;
  gap: 0.5rem;
}

.changelog-textarea {
  width: 100%;
  height: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.changelog-textarea:focus { border-color: var(--border-focus); }

/* Responsive */
@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }
  .nav-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .global-team-bar { padding: 0.75rem 1rem; }
  .main-content { padding: 1rem; }
  .divergence-tree {
    flex-direction: column;
    align-items: stretch;
  }
  .tree-split-connector { display: none; }
}
