:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2332;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #22d3ee;
  --accent-purple: #a78bfa;
  --accent-green: #34d399;
  --accent-orange: #fb923c;
  --accent-red: #f87171;
  --accent-blue: #60a5fa;
  --accent-pink: #f472b6;
  --accent-yellow: #fbbf24;
  --border-color: #334155;
  --hover-bg: #2d3a4f;
}

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

body {
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ========== STICKY HEADER ========== */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 100%
  );
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
  white-space: nowrap;
}

.logo span {
  color: var(--text-primary);
}
.logo-img {
  height: 1.125rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.logo .version {
  font-size: 0.65rem;
  font-style: italic;
  color: var(--text-muted);
  margin-left: 0.25rem;
}
.logo .refresh-time {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-left: 0.75rem;
  font-weight: 400;
}
.logo .refresh-countdown {
  color: var(--accent-cyan);
  margin-left: 0.5rem;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Two-line header meta layout */
.header-meta {
  display: inline-flex;
  align-items: center; /* Vertically center version with the two lines */
  vertical-align: middle;
  margin-left: 0.5rem;
  gap: 0.35rem;
}
.header-meta .version {
  align-self: center;
}
.header-meta-lines {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.header-meta-line1 {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.header-meta-line2 {
  font-size: 0.6rem;
  color: var(--accent-cyan);
  text-align: left;
  margin-top: 0.1rem;
  padding-left: 0.8rem; /* Indent to align under "Refreshed:" */
}

/* Header action buttons (refresh, logout) - positioned before nav tabs */
.header-action-button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 0.1rem;
}
/* Group buttons and nav tabs together */
.header-nav-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.header-action-button:hover {
  background: var(--hover-bg);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}
.header-action-button.logout-button:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
}
.header-action-button.refreshing {
  animation: spin 1s linear infinite;
  color: var(--accent-cyan);
}

.nav-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.nav-tab {
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-tab:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.nav-tab.active {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border-color: var(--accent-cyan);
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  transition: 0.2s;
}
.hamburger:hover span {
  background: var(--text-primary);
}

/* Mobile nav dropdown */
.nav-mobile {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}
.nav-mobile.open {
  display: flex;
}

/* Filter row */
.filter-row {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(34, 211, 238, 0.3);
  flex-wrap: nowrap;
}
.filter-row.active {
  display: flex;
}

.filter-row-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

.filter-row-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Compact filter dropdown pattern */
.filter-dropdown {
  position: relative;
  flex: 1;
  min-width: 100px;
  max-width: 200px;
}

.filter-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  width: 100%;
}
.filter-dropdown-toggle:hover {
  border-color: var(--accent-purple);
}
.filter-dropdown-toggle .arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.filter-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 1001;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.filter-dropdown-menu.open {
  display: block;
}

/* Wide dropdown menu - for Release filter showing version + date */
/* Applied to all release filter menus across dashboards */
#release-filter-menu,
#roadmap-release-menu,
#customers-release-menu,
#bugs-release-menu,
#validation-release-menu {
  right: auto;
  min-width: 280px;
}
#release-filter-menu .option-label,
#roadmap-release-menu .option-label,
#customers-release-menu .option-label,
#bugs-release-menu .option-label,
#validation-release-menu .option-label {
  min-width: 140px;
  white-space: nowrap;
}
#release-filter-menu .option-meta,
#roadmap-release-menu .option-meta,
#customers-release-menu .option-meta,
#bugs-release-menu .option-meta,
#validation-release-menu .option-meta {
  white-space: nowrap;
}

/* Wide dropdown menu - for Customer filter showing customer + count */
/* Applied to all customer filter menus across dashboards */
#release-customer-header-menu,
#roadmap-customer-menu,
#customers-customer-menu,
#bugs-customer-menu,
#validation-customer-menu {
  right: auto;
  min-width: 280px;
}
#release-customer-header-menu .option-count,
#roadmap-customer-menu .option-count,
#customers-customer-menu .option-count,
#bugs-customer-menu .option-count,
#validation-customer-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Priority filter showing priority + count */
/* Applied to all priority filter menus across dashboards */
#release-priority-header-menu,
#roadmap-priority-menu,
#customers-priority-menu,
#bugs-priority-menu,
#validation-priority-menu {
  right: auto;
  min-width: 200px;
}
#release-priority-header-menu .option-count,
#roadmap-priority-menu .option-count,
#customers-priority-menu .option-count,
#bugs-priority-menu .option-count,
#validation-priority-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for State filter showing state + count */
/* Applied to all state filter menus across dashboards */
#release-state-header-menu,
#roadmap-state-menu,
#customers-state-menu,
#bugs-state-menu,
#validation-state-menu {
  right: auto;
  min-width: 200px;
}
#release-state-header-menu .option-count,
#roadmap-state-menu .option-count,
#customers-state-menu .option-count,
#bugs-state-menu .option-count,
#validation-state-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Team filter showing team + count */
/* Applied to all team filter menus across dashboards */
#release-team-header-menu,
#roadmap-team-menu,
#bugs-team-menu,
#validation-team-menu {
  right: auto;
  min-width: 200px;
}
#release-team-header-menu .option-count,
#roadmap-team-menu .option-count,
#bugs-team-menu .option-count,
#validation-team-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Type filter showing type + count */
#release-type-header-menu {
  right: auto;
  min-width: 200px;
}
#release-type-header-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Bug Type filter showing type + count */
/* Applied to all bug type filter menus across dashboards */
#release-bugtype-header-menu,
#bugs-bugtype-menu,
#validation-bugtype-menu {
  right: auto;
  min-width: 260px;
}
#release-bugtype-header-menu .option-count,
#bugs-bugtype-menu .option-count,
#validation-bugtype-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Iteration filter showing iteration + count */
#roadmap-iteration-menu {
  right: auto;
  min-width: 220px;
}
#roadmap-iteration-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Tag filter showing tag + count */
/* Applied to all tag filter menus across dashboards */
#release-tag-menu,
#roadmap-tag-menu,
#customers-tag-menu,
#bugs-tag-menu,
#validation-tag-menu {
  right: auto;
  min-width: 280px;
}
#release-tag-menu .option-count,
#roadmap-tag-menu .option-count,
#customers-tag-menu .option-count,
#bugs-tag-menu .option-count,
#validation-tag-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Assignee filter showing name + count */
#roadmap-assignee-menu {
  right: auto;
  min-width: 250px;
}
#roadmap-assignee-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Category filter showing category + count */
#customers-category-menu {
  right: auto;
  min-width: 220px;
}
#customers-category-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Wide dropdown menu - for Aging filter showing bucket + count */
#customers-aging-menu,
#bugs-aging-menu,
#tasks-aging-menu {
  right: auto;
  min-width: 180px;
}
#customers-aging-menu .option-count,
#bugs-aging-menu .option-count,
#tasks-aging-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Tasks filter menus - consistent with other dashboards */
#tasks-priority-menu,
#tasks-state-menu,
#tasks-team-menu {
  right: auto;
  min-width: 200px;
}
#tasks-priority-menu .option-count,
#tasks-state-menu .option-count,
#tasks-team-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Tasks tag filter - consistent with other dashboards */
#tasks-tag-menu {
  right: auto;
  min-width: 200px;
}
#tasks-tag-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Tasks Task Type filter */
#tasks-tasktype-menu {
  right: auto;
  min-width: 220px;
}
#tasks-tasktype-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Tasks Iteration filter */
#tasks-iteration-menu {
  right: auto;
  min-width: 220px;
}
#tasks-iteration-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Tasks Assignee filter */
#tasks-assignee-menu {
  right: auto;
  min-width: 250px;
}
#tasks-assignee-menu .option-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.filter-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s;
}
.filter-dropdown-option:hover {
  background: var(--hover-bg);
}
.filter-dropdown-option input[type="checkbox"],
.filter-dropdown-option input[type="radio"] {
  accent-color: var(--accent-purple);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.filter-dropdown-option .option-label {
  color: var(--text-primary);
  font-weight: 500;
}
.filter-dropdown-option .option-meta {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-left: auto;
}
.filter-dropdown-option.warning .option-meta {
  color: var(--accent-orange);
}
/* Label-based filter options - entire row is clickable */
label.filter-dropdown-option {
  margin: 0;
  font-weight: normal;
}

.filter-dropdown-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  position: sticky;
  bottom: 0;
}
.filter-dropdown-actions button {
  flex: 1;
  padding: 0.35rem 0.5rem;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}
.filter-btn-primary {
  background: var(--accent-purple);
  color: white;
}
.filter-btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color) !important;
}

/* AND/OR toggle for Tag filter */
.tag-logic-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}
.tag-logic-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.tag-logic-btn {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
}
.tag-logic-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.tag-logic-btn.active {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border-color: var(--accent-cyan);
}

.filter-dropdown-search {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}
.filter-dropdown-search input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.75rem;
}
.filter-dropdown-search input:focus {
  outline: none;
  border-color: var(--accent-purple);
}
.filter-dropdown-search input::placeholder {
  color: var(--text-muted);
}
.filter-dropdown-options {
  max-height: 280px;
  overflow-y: auto;
}

/* Header select styling */
.filter-row select {
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.filter-row select:hover {
  border-color: var(--accent-purple);
}

/* Header info panel */
.filter-row-info {
  position: relative;
  flex-shrink: 0;
}
.info-toggle {
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
}
.info-toggle:hover {
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
}
.info-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 320px;
  max-width: 400px;
  z-index: 1002;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 0.75rem;
  line-height: 1.5;
}
.info-panel.open {
  display: block;
}
.info-panel p {
  margin: 0.35rem 0;
  color: var(--text-secondary);
}
.info-panel strong {
  color: var(--accent-cyan);
}

/* Mini-bar chart for releases */
.mini-chart-container {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.mini-chart-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.mini-chart-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.mini-bar-track {
  display: flex;
  gap: 3px;
  height: 40px;
  align-items: flex-end;
}

.mini-bar {
  flex: 1;
  min-width: 16px;
  max-width: 60px;
  background: #475569;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.mini-bar:hover {
  background: var(--accent-cyan);
  opacity: 0.8;
}

.mini-bar.selected {
  background: var(--accent-cyan);
}

.mini-bar.search-match,
.mini-bar.filter-match {
  background: var(--accent-cyan);
}

.mini-bar.dimmed {
  opacity: 0.3;
}

.mini-bar.selected::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--accent-cyan);
}

.mini-bar-label.dimmed {
  opacity: 0.3;
}

.mini-bar-labels {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}

.mini-bar-label {
  flex: 1;
  min-width: 16px;
  max-width: 60px;
  text-align: center;
  font-size: 0.55rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-bar-label.selected {
  color: var(--accent-cyan);
  font-weight: 600;
}

.mini-bar-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.mini-bar:hover .mini-bar-tooltip {
  opacity: 1;
}

.tooltip-version {
  color: var(--text-primary);
  font-weight: 600;
}

.tooltip-date {
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.tooltip-count {
  color: var(--accent-cyan);
  display: block;
  margin-top: 2px;
}

.mini-chart-selection {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.mini-chart-selection-label {
  color: var(--text-muted);
}

.mini-chart-selection-value {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Chart header row pattern - title + subtitle on same line */
.chart-header-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.chart-header-row h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.chart-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Clear all filters button */
.clear-filters-btn {
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: 1px solid var(--accent-red);
  border-radius: 4px;
  color: var(--accent-red);
  font-family: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.clear-filters-btn:hover {
  background: var(--accent-red);
  color: var(--bg-primary);
}

.clear-filters-btn.hidden {
  display: none;
}

.filter-dropdown-empty {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

@media (max-width: 1100px) {
  .nav-tabs {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

.main-content {
  padding: 1.5rem 2rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.breadcrumb-item {
  color: var(--accent-cyan);
  cursor: pointer;
  transition: color 0.2s;
}

.breadcrumb-item:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

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

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

.dashboard-view {
  display: none;
}
.dashboard-view.active {
  display: block;
}

.work-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.work-items-table th {
  text-align: left;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.work-items-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.work-items-table tr:hover {
  background: var(--hover-bg);
}

/* Clickable row styling for tables with relationship popups */
.work-items-table tr.clickable-row {
  cursor: pointer;
}
.work-items-table tr.clickable-row:hover {
  background: var(--bg-hover);
}

.work-item-id {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}

.work-item-id:hover {
  text-decoration: underline;
}

.work-item-title {
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.state-done,
.state-closed {
  background: rgba(52, 211, 153, 0.2);
  color: var(--accent-green);
}
.state-inprogress,
.state-in-progress {
  background: rgba(96, 165, 250, 0.2);
  color: var(--accent-blue);
}
.state-new,
.state-todo,
.state-to-do {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
}
.state-triaged {
  background: rgba(251, 146, 60, 0.2);
  color: var(--accent-orange);
}
.state-removed {
  background: rgba(248, 113, 113, 0.2);
  color: var(--accent-red);
}
.state-ready-for-review {
  background: rgba(167, 139, 250, 0.2);
  color: var(--accent-purple);
}

/* Aging badges */
.aging-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}
.aging-1-day {
  background: rgba(52, 211, 153, 0.2);
  color: var(--accent-green);
}
.aging-1-week {
  background: rgba(96, 165, 250, 0.2);
  color: var(--accent-blue);
}
.aging-2-weeks {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}
.aging-4-weeks {
  background: rgba(251, 146, 60, 0.2);
  color: var(--accent-orange);
}
.aging-Older {
  background: rgba(248, 113, 113, 0.2);
  color: var(--accent-red);
}
.aging-TBD {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

/* Bug Type missing styling */
.bugtype-missing {
  color: var(--accent-red);
  font-style: italic;
}

/* Category badges for Customers table */
.category-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}
.category-enhancement-request {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}
.category-bug {
  background: rgba(251, 146, 60, 0.2);
  color: var(--accent-orange);
}
.category-task {
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent-purple);
}
.col-category {
  width: 110px;
  min-width: 90px;
}

/* Relationship pills for Customers table */
.col-title .title-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.col-title .rel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}
.rel-pill {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
}
.rel-pill-parent {
  background: rgba(251, 146, 60, 0.2);
  color: var(--accent-orange);
}
.rel-pill-children {
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent-cyan);
}
.rel-pill-related {
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent-purple);
}
.rel-pill-none {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.table-container {
  max-height: 500px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

#release-items-table.table-container {
  max-height: none;
  overflow-y: visible;
}

/* Override for Validation dashboard generic table */
#data-quality-tables.table-container {
  max-height: none;
  overflow-y: visible;
  border: none;
}

/* Scrollable table for Customers view with fixed max-height */
#customer-issues-table .table-scroll-container {
  max-height: 600px;
  overflow-y: auto;
}

/* Sticky table headers for scrolling tables */
.table-scroll-container {
  position: relative;
}
.table-scroll-container thead th {
  position: sticky;
  top: 0;
  background: var(--bg-tertiary);
  z-index: 10;
  box-shadow: 0 1px 0 var(--border-color);
}

/* Reset sort button */
.reset-sort-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s;
}
.reset-sort-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

/* Table header with reset button */
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.table-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
}

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

.stat-card.clickable:hover {
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.15);
}

.stat-card.clickable.active {
  border-color: var(--accent-cyan);
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.3),
    0 4px 20px rgba(34, 211, 238, 0.2);
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    rgba(34, 211, 238, 0.05) 100%
  );
}

.stat-card.non-clickable {
  cursor: default;
}
.stat-card.non-clickable:hover {
  border-color: var(--border-color);
  transform: none;
  box-shadow: none;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

.stat-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

#team-distribution-charts {
  grid-template-columns: repeat(5, 1fr);
}

#team-distribution-charts .chart-card {
  min-width: 0;
}

#team-distribution-charts .chart-container {
  height: 200px;
}

.chart-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.chart-container {
  position: relative;
  height: 250px;
}

.chart-container.tall {
  height: 350px;
}

.chart-filter {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.chart-filter .multi-select-dropdown {
  width: 100%;
}

.chart-filter .multi-select-display {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.chart-filter .multi-select-options {
  max-height: 250px;
}

/* Time period selector */
.time-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.time-selector-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.time-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.time-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.time-btn.active {
  background: var(--accent-blue);
  color: var(--bg-primary);
  border-color: var(--accent-blue);
}

/* Release selector */
.release-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.release-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.release-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.release-btn.active {
  background: var(--accent-purple);
  color: var(--bg-primary);
  border-color: var(--accent-purple);
}

.release-btn .release-date {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

.release-btn.warning {
  border-color: var(--accent-orange);
}
.release-btn.warning::after {
  content: "⚠️";
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

/* Insights panel */
.insights-panel {
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.1) 0%,
    rgba(167, 139, 250, 0.1) 100%
  );
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.insights-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.insight-icon {
  min-width: 20px;
}

.insight-item.critical {
  color: var(--accent-red);
}
.insight-item.warning {
  color: var(--accent-orange);
}
.insight-item.success {
  color: var(--accent-green);
}
.insight-item.info {
  color: var(--accent-blue);
}
.insight-item.clickable {
  cursor: pointer;
  transition: opacity 0.2s;
}
.insight-item.clickable:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* Wide insights panel - multi-column layout */
.insights-panel-wide .insights-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.25rem 1.5rem;
}

.insights-panel-wide .insight-item {
  margin-bottom: 0.25rem;
}

/* Quality card group headers */
.quality-group-header {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.quality-group-header:first-child {
  margin-top: 0;
}

/* Task Insights - horizontal layout */
.tasks-insights-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.tasks-insights-icon {
  font-size: 1rem;
}
.tasks-insights-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-cyan);
}
.tasks-insights-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.tasks-insights-items .insight-item {
  margin-bottom: 0;
  white-space: nowrap;
}
#tasks-insights {
  padding: 0.75rem 1rem;
}

.insights-grid .insights-title {
  margin-bottom: 0.75rem;
}

.insights-grid .insights-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 2rem;
}

.insights-grid .insight-item {
  margin-bottom: 0;
}

/* Horizontal insights layout */
.insights-horizontal {
  padding: 0.75rem 1.25rem;
}
.insights-horizontal .insights-content {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
}
.insights-horizontal .insight-item {
  margin-bottom: 0;
  white-space: nowrap;
}
.insights-horizontal .insights-title {
  margin-bottom: 0;
  margin-right: 1rem;
}

/* Aging Histogram Section */
.aging-histogram-section {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.aging-histogram-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.aging-histogram-wrapper {
  display: flex;
  align-items: stretch;
}
.aging-histogram-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-right: 0.5rem;
  padding-bottom: 1.5rem;
  min-width: 30px;
}
.aging-yaxis-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1;
}
.aging-histogram-chart {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.aging-histogram-bars {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  height: 120px;
  border-left: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding-left: 0.5rem;
  padding-bottom: 0;
}
.aging-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.aging-bar {
  width: 100%;
  max-width: 50px;
  background: linear-gradient(
    to top,
    var(--accent-cyan),
    rgba(34, 211, 238, 0.6)
  );
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.aging-bar:hover {
  filter: brightness(1.2);
}
.aging-bar-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  text-align: center;
  white-space: nowrap;
}
.aging-bar-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.aging-bar.bar-1-day {
  background: linear-gradient(
    to top,
    rgba(52, 211, 153, 1),
    rgba(52, 211, 153, 0.6)
  );
}
.aging-bar.bar-1-week {
  background: linear-gradient(
    to top,
    rgba(96, 165, 250, 1),
    rgba(96, 165, 250, 0.6)
  );
}
.aging-bar.bar-2-weeks {
  background: linear-gradient(to top, #fbbf24, rgba(251, 191, 36, 0.6));
}
.aging-bar.bar-4-weeks {
  background: linear-gradient(
    to top,
    rgba(251, 146, 60, 1),
    rgba(251, 146, 60, 0.6)
  );
}
.aging-bar.bar-Older {
  background: linear-gradient(
    to top,
    rgba(248, 113, 113, 1),
    rgba(248, 113, 113, 0.6)
  );
}
.aging-bar.bar-TBD {
  background: linear-gradient(
    to top,
    rgba(148, 163, 184, 1),
    rgba(148, 163, 184, 0.6)
  );
}

/* Architecture Diagram Section */
.architecture-diagram-section {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.architecture-diagram-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.architecture-diagram-title .filter-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}
.arch-diagram {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
/* Top layer: User Interface row */
.arch-layer {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.arch-layer-main {
  flex: 1;
}
.arch-layer-side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 110px;
}
.arch-section {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  background: rgba(30, 41, 59, 0.5);
}
.arch-section-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  padding: 0.3rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.arch-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-start;
}
.arch-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  text-align: center;
  min-width: 80px;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.arch-box:hover {
  background: var(--hover-bg);
  border-color: var(--accent-cyan);
}
.arch-box .box-label {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  word-break: break-word;
  color: var(--text-primary);
}
.arch-box .bug-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.arch-box.has-bugs {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.15);
}
.arch-box.has-bugs .box-label {
  color: var(--text-primary);
}
.arch-box.has-bugs .bug-count {
  color: var(--accent-cyan);
}
.arch-box.no-bugs {
  opacity: 1;
  background: var(--bg-secondary);
  border-color: rgba(100, 116, 139, 0.5);
}
.arch-box.no-bugs .box-label {
  color: var(--text-secondary);
}
.arch-box.no-bugs .bug-count {
  color: var(--text-muted);
  font-size: 0.75rem;
}
/* Middle layer: CWP, SCG, ESG in a row */
.arch-middle-layer {
  display: flex;
  gap: 0.5rem;
}
.arch-section-cwp,
.arch-section-scg,
.arch-section-esg {
  flex: 1;
}
.arch-section-cwp .arch-boxes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}
.arch-section-scg .arch-boxes,
.arch-section-esg .arch-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}
/* Standalone boxes (Power BI, Analytics, Data Pipelines) */
.arch-standalone {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 52px;
  justify-content: center;
}
.arch-standalone:hover {
  background: var(--hover-bg);
  border-color: var(--accent-cyan);
}
.arch-standalone.has-bugs {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.15);
}
.arch-standalone .box-label {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-primary);
}
.arch-standalone .bug-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.arch-standalone.no-bugs {
  opacity: 1;
  background: var(--bg-secondary);
  border-color: rgba(100, 116, 139, 0.5);
}
.arch-standalone.no-bugs .box-label {
  color: var(--text-secondary);
}
.arch-standalone.no-bugs .bug-count {
  color: var(--text-muted);
  font-size: 0.75rem;
}
/* Infrastructure layer */
.arch-infra-layer {
  display: flex;
  gap: 0.5rem;
}
.arch-section-infra {
  flex: 1;
}
.arch-section-infra .arch-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.arch-azure-box {
  width: 100%;
  margin-top: 0.4rem;
}
/* Color coding for different sections */
.arch-section-ui .arch-section-header {
  background: rgba(96, 165, 250, 0.25);
  color: var(--accent-blue);
}
.arch-section-cwp .arch-section-header {
  background: rgba(167, 139, 250, 0.25);
  color: var(--accent-purple);
}
.arch-section-scg .arch-section-header {
  background: rgba(52, 211, 153, 0.25);
  color: var(--accent-green);
}
.arch-section-esg .arch-section-header {
  background: rgba(251, 146, 60, 0.25);
  color: var(--accent-orange);
}
.arch-section-infra .arch-section-header {
  background: rgba(148, 163, 184, 0.25);
  color: var(--text-primary);
}
/* Totals row */
.arch-totals {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.arch-totals .total-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.arch-totals .total-count {
  font-weight: 700;
  color: var(--accent-cyan);
}
.arch-totals .total-item.clickable {
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.arch-totals .total-item.clickable:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.arch-totals .total-item.clickable.active {
  background: rgba(34, 211, 238, 0.2);
  border: 1px solid var(--accent-cyan);
  color: var(--text-primary);
}
.arch-totals .total-item.clickable.active .total-count {
  color: var(--accent-cyan);
}

.team-cta {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  border: 1px dashed var(--border-color);
}

/* Engineer Details Section */
.engineer-section {
  margin-bottom: 2rem;
}

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

.engineer-section-header h4 {
  color: var(--accent-purple);
  font-size: 1.1rem;
  margin: 0;
}

.engineer-summary-table {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.engineer-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.engineer-matrix-table th,
.engineer-matrix-table td {
  padding: 0.5rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.engineer-matrix-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 500;
  position: sticky;
  top: 0;
}

.engineer-matrix-table .eng-name-col {
  text-align: left;
  min-width: 150px;
}

.engineer-matrix-table .eng-team-col {
  text-align: left;
  min-width: 100px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.engineer-matrix-table .eng-type-col {
  min-width: 50px;
}

.engineer-matrix-table .eng-total-col {
  font-weight: 600;
  background: rgba(139, 92, 246, 0.1);
}

.engineer-matrix-table .eng-effort-col {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.engineer-matrix-table tbody tr.engineer-row {
  cursor: pointer;
  transition: background 0.15s;
}

.engineer-matrix-table tbody tr.engineer-row:hover {
  background: rgba(139, 92, 246, 0.15);
}

.engineer-matrix-table tfoot td {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border-color);
}

.engineer-filter-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.engineer-filter-bar label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.team-coverage-indicator {
  margin-left: auto;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.team-coverage-indicator.all-accounted {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.team-coverage-indicator.missing-members {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.team-coverage-indicator .coverage-icon {
  font-size: 1rem;
}

.engineer-details-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
}

.engineer-work-group {
  margin-bottom: 1.5rem;
}

.engineer-work-group:last-child {
  margin-bottom: 0;
}

.engineer-work-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.engineer-work-group-header h5 {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin: 0;
}

.engineer-work-group-header .effort-subtotal {
  color: var(--accent-cyan);
  font-size: 0.875rem;
  font-weight: 600;
}

.gantt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.gantt-table th {
  text-align: left;
  padding: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
}

.gantt-table td {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.gantt-table .id-col {
  width: 60px;
}
.gantt-table .title-col {
  width: 180px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-table .date-col {
  width: 75px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.gantt-table .state-col {
  width: 90px;
}
.gantt-table .effort-col {
  width: 50px;
  text-align: right;
}
.gantt-table .gantt-col {
  width: 100%;
  min-width: 200px;
}

.gantt-cell {
  position: relative;
  height: 20px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 4px;
}

.gantt-bar {
  position: absolute;
  height: 100%;
  border-radius: 4px;
  min-width: 4px;
}

.gantt-bar.bug {
  background: var(--accent-red);
}
.gantt-bar.task {
  background: var(--accent-blue);
}
.gantt-bar.delivery-slice {
  background: var(--accent-green);
}
.gantt-bar.feature {
  background: var(--accent-purple);
}
.gantt-bar.issue {
  background: var(--accent-orange);
}
.gantt-bar.epic {
  background: var(--accent-cyan);
}

.gantt-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.gantt-indicator.before {
  left: -12px;
}
.gantt-indicator.ongoing {
  right: -12px;
}

.gantt-timeline {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.no-engineer-data {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-style: italic;
}

/* Validation issues */
.validation-issue {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--accent-red);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.validation-issue-title {
  font-weight: 600;
  color: var(--accent-red);
  margin-bottom: 0.5rem;
}

.validation-issue-details {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Multi-select hint */
.multi-select-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Effort display */
.effort-value {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-yellow);
}

/* Bug Trend Section */
.bug-filters-bar,
.filter-bar {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.date-range-buttons {
  display: flex;
  gap: 0.25rem;
}

.date-range-buttons .time-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.date-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

/* Gantt chart styles */
.gantt-header {
  min-width: 200px;
  white-space: nowrap;
}

.gantt-weeks {
  display: flex;
  gap: 0;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.gantt-week-label {
  min-width: 30px;
  text-align: left;
  padding-right: 2px;
}

.gantt-cell {
  min-width: 200px;
  padding: 0.25rem !important;
}

.gantt-bar-container {
  position: relative;
  height: 16px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.gantt-week-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-color);
  opacity: 0.5;
}

.gantt-bar {
  position: absolute;
  top: 2px;
  height: 12px;
  border-radius: 2px;
  cursor: pointer;
}

.gantt-bar.closed {
  background: var(--accent-green);
}

.gantt-bar.open {
  background: var(--accent-orange);
  background: linear-gradient(
    90deg,
    var(--accent-orange) 0%,
    var(--accent-orange) 80%,
    transparent 100%
  );
}

/* Sortable table styles */
.sortable-header {
  cursor: pointer;
  user-select: none;
}

.sortable-header:hover {
  background: var(--hover-bg);
}

.sort-indicator {
  margin-left: 0.25rem;
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Release table sections */
.release-table-section {
  margin-bottom: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.release-table-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.release-table-title .table-icon {
  font-size: 1.2rem;
}

.release-table-section table {
  margin-bottom: 0;
}

/* Customer pivot drilldown styles */
.customers-pivot-drilldown {
  padding: 1rem;
}

.customer-chart-section {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.customer-chart-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.customer-pivot-section {
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.customer-pivot-title {
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.customer-pivot-title .table-icon {
  margin-right: 0.5rem;
}

.customer-pivot-table-wrapper {
  overflow-x: auto;
}

.customer-pivot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: max-content;
}

.customer-pivot-table th {
  background: var(--bg-secondary);
  padding: 0.5rem 0.5rem;
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.customer-pivot-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.customer-pivot-table tr:last-child td {
  border-bottom: none;
}

.customer-pivot-table tr:hover {
  background: var(--hover-bg);
}

.pivot-col-id {
  width: 60px;
}
.pivot-col-title {
  min-width: 250px;
  max-width: 350px;
}
.pivot-col-state {
  width: 80px;
}
.pivot-col-customer {
  width: 70px;
  text-align: center;
  font-size: 0.7rem;
}

.pivot-cell-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}

.pivot-cell-check {
  text-align: center;
  color: var(--accent-green);
  font-weight: bold;
}

/* Table filter indicator */
.table-filter-indicator {
  background: var(--accent-blue);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.clear-filter-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.clear-filter-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Clear sort button */
.clear-sort-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  margin-left: 0.5rem;
}

.clear-sort-btn:hover {
  background: var(--hover-bg);
  color: var(--text-secondary);
}

/* Roadmap view styles */
.roadmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.roadmap-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.roadmap-title-group {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.ado-backlog-link {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.ado-backlog-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.roadmap-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.roadmap-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

#roadmap-table-container {
  max-height: calc(100vh - 280px);
}

/* Effort summary cards */
.roadmap-effort-cards {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.effort-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  min-width: 160px;
  max-width: 200px;
  flex: 1;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.1s;
}

.effort-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.effort-card.selected {
  border-color: var(--accent-cyan);
  border-width: 2px;
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    rgba(34, 211, 238, 0.08) 100%
  );
}

.effort-card.total {
  border-color: var(--accent-cyan);
  border-width: 2px;
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    rgba(34, 211, 238, 0.1) 100%
  );
}

.effort-card-header {
  margin-bottom: 0.5rem;
}

.effort-card-label {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.effort-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.effort-card.total .effort-card-value {
  color: var(--accent-cyan);
}

.effort-card-unit {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.25rem;
}

.effort-card-capacity {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.effort-card-stats {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.effort-card-stats span {
  display: block;
}

.effort-card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.effort-card-lead-photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.effort-card-lead-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.effort-card-lead-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}

/* Tasks Team Summary */
.tasks-team-summary {
  margin-bottom: 1rem;
}

.tasks-team-summary-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.tasks-team-summary-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tasks-team-summary-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tasks-team-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.effort-card-participation {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.effort-card-participation .pct-high {
  color: var(--accent-green);
  font-weight: 600;
}

.effort-card-participation .pct-medium {
  color: var(--accent-yellow);
  font-weight: 600;
}

.effort-card-participation .pct-low {
  color: var(--accent-orange);
  font-weight: 600;
}

.reset-sort-btn {
  background: transparent;
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.reset-sort-btn:hover {
  background: var(--accent-orange);
  color: var(--bg-primary);
}

/* Clickable table rows */
.clickable-row {
  cursor: pointer;
  transition: background 0.15s;
}

.clickable-row:hover {
  background: var(--bg-hover);
}

/* Total row styling */
.total-row {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border-color);
}

.total-row:hover {
  background: var(--bg-secondary);
}

/* Inline effort summary above table */
.roadmap-table-info {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.25rem;
  padding: 0 0.5rem;
}

.roadmap-table-effort-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
}

.roadmap-table-effort-summary strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Iteration count badge for features spanning multiple iterations */
.iteration-count-badge {
  display: inline-block;
  background: var(--accent-purple);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Blocked badge - critical warning indicator */
.blocked-badge {
  display: inline-block;
  background: #dc2626;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* No slices badge - warning indicator */
.no-slices-badge {
  display: inline-block;
  background: var(--state-removed);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Zero effort badge - warning indicator */
.zero-effort-badge {
  display: inline-block;
  background: var(--accent-orange);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Roadmap section headers */
.roadmap-section {
  margin-bottom: 1.5rem;
}

/* Collapsible section styles */
.roadmap-section.collapsible .roadmap-section-header {
  cursor: pointer;
  user-select: none;
}
.roadmap-section.collapsible .roadmap-section-header:hover {
  background: rgba(34, 211, 238, 0.05);
  margin: 0 -0.5rem;
  padding: 0.25rem 0.5rem 0.5rem 0.5rem;
  border-radius: 6px;
}
.roadmap-section.collapsible .collapse-indicator {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.roadmap-section.collapsible.collapsed .collapse-indicator {
  transform: rotate(-90deg);
}
.roadmap-section.collapsible .section-content {
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    opacity 0.2s ease-out;
  max-height: 2000px;
  opacity: 1;
}
.roadmap-section.collapsible.collapsed .section-content {
  max-height: 0;
  opacity: 0;
}

.roadmap-section-header {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.roadmap-section-header .section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
}

/* Strategy Summary Table */
.strategy-summary-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.strategy-summary-table th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.3;
}

.strategy-summary-table th:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.strategy-summary-table td {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.strategy-summary-table td:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.strategy-summary-table tr:last-child td {
  border-bottom: none;
}

.strategy-summary-table .row-label {
  background: var(--bg-secondary);
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: left;
  padding-left: 1rem;
  width: 100px;
}

.strategy-summary-table .count-value {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.strategy-summary-table .count-value.clickable {
  cursor: pointer;
  transition: color 0.2s;
}

.strategy-summary-table .count-value.clickable:hover {
  color: var(--accent-cyan);
}

.strategy-summary-table .effort-value {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent-cyan);
}

.strategy-summary-table .effort-value .effort-pct {
  font-weight: 700;
  font-size: 1.25rem;
}

.strategy-summary-table .effort-value .effort-days {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.4rem;
}

.strategy-summary-table th.strategy-col {
  width: calc((100% - 100px) / 4);
}

/* OKR Summary footer note */
.strategy-summary-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-right: 0.25rem;
}

.strategy-summary-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.strategy-summary-note .clickable {
  cursor: pointer;
  color: var(--accent-cyan);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.strategy-summary-note .clickable:hover {
  opacity: 0.8;
}

/* Strategy multi-category error message */
.strategy-error-message {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid var(--accent-orange);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.strategy-error-message .error-icon {
  font-size: 1rem;
}

.strategy-error-message a {
  color: var(--accent-cyan);
  text-decoration: underline;
  cursor: pointer;
}

.strategy-error-message a:hover {
  opacity: 0.8;
}

/* Enhancement Request Prioritization Summary Section */
.er-prioritization-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}
.er-prioritization-section.collapsible .er-prioritization-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.er-prioritization-section.collapsible .er-prioritization-header:hover {
  background: rgba(34, 211, 238, 0.05);
  margin: -0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
}
.er-prioritization-section.collapsible .collapse-indicator {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.er-prioritization-section.collapsible.collapsed .collapse-indicator {
  transform: rotate(-90deg);
}
.er-prioritization-section.collapsible .er-section-content {
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    opacity 0.2s ease-out;
  max-height: 2000px;
  opacity: 1;
}
.er-prioritization-section.collapsible.collapsed .er-section-content {
  max-height: 0;
  opacity: 0;
}

.er-prioritization-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.er-prioritization-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.strategy-summary-table .er-col {
  width: calc((100% - 100px) / 3);
}

.strategy-summary-table .er-col-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.strategy-summary-table .er-col-subtitle {
  font-weight: 400;
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.er-untagged-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.er-untagged-note.clickable {
  cursor: pointer;
  color: var(--accent-cyan);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.er-untagged-note.clickable:hover {
  opacity: 0.8;
}

/* Generic Collapsible Section */
.collapsible-section {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}
.collapsible-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}
.collapsible-section-header:hover {
  background: rgba(34, 211, 238, 0.05);
}
.collapsible-section-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}
.collapsible-section-header .collapse-indicator {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.collapsible-section.collapsed .collapse-indicator {
  transform: rotate(-90deg);
}
.collapsible-section-content {
  padding: 1rem 1.25rem;
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    opacity 0.2s ease-out,
    padding 0.3s ease-out;
  max-height: 5000px;
  opacity: 1;
}
.collapsible-section.collapsed .collapsible-section-content {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Filter search input in header */
.filter-search-input {
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}

.filter-search-input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.filter-search-input::placeholder {
  color: var(--text-muted);
}

/* Auto-fit and resizable columns */
.work-items-table,
.sortable-table {
  table-layout: auto;
  width: 100%;
}

.work-items-table th,
.work-items-table td,
.sortable-table th,
.sortable-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.work-items-table .work-item-title,
.sortable-table .work-item-title {
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-footer {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: right;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.table-header {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}

/* Resizable columns */
.resizable-table {
  table-layout: fixed;
  width: 100%;
}

.resizable-table th {
  position: relative;
  user-select: none;
}

.resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  background: transparent;
  z-index: 1;
}

.resize-handle:hover,
.resize-handle.resizing {
  background: var(--accent-blue);
}

/* Column width presets (used as defaults, can be overridden by user) */
.col-id {
  width: 55px;
  min-width: 45px;
}
.col-title {
  width: auto;
  min-width: 150px;
}
.col-type {
  width: 90px;
  min-width: 70px;
}
.col-state {
  width: 90px;
  min-width: 70px;
}
.col-assignee {
  width: 120px;
  min-width: 80px;
}
.col-release {
  width: 100px;
  min-width: 70px;
}
.col-team {
  width: 100px;
  min-width: 70px;
}
.col-date {
  width: 90px;
  min-width: 80px;
}
.col-effort {
  width: 60px;
  min-width: 50px;
}
.col-priority {
  width: 60px;
  min-width: 50px;
}
.col-created {
  width: 90px;
  min-width: 80px;
}
.col-closed {
  width: 90px;
  min-width: 80px;
}
.col-aging {
  width: 75px;
  min-width: 60px;
}
.col-bugtype {
  width: 140px;
  min-width: 100px;
}
.col-tags {
  width: 120px;
  min-width: 80px;
}
.col-customers {
  width: 120px;
  min-width: 80px;
}
.col-csowner {
  width: 100px;
  min-width: 70px;
}
.priority-cell {
  text-align: center;
  font-weight: 500;
  color: var(--text-secondary);
}
.tags-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.priority-value {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ========== GENERIC TABLE COMPONENT STYLES ========== */

/* Table Section Container */
.generic-table-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

/* Collapsible Table Section */
.generic-table-section.collapsible .generic-table-title-bar {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.generic-table-section.collapsible .generic-table-title-bar:hover {
  background: rgba(34, 211, 238, 0.08);
}
.generic-table-section.collapsible .collapse-indicator {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
  transition: transform 0.2s;
}
.generic-table-section.collapsible.collapsed .collapse-indicator {
  transform: rotate(-90deg);
}
.generic-table-section .generic-table-collapsible-content {
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    opacity 0.2s ease-out;
  max-height: 5000px;
  opacity: 1;
}
.generic-table-section.collapsed .generic-table-collapsible-content {
  max-height: 0;
  opacity: 0;
}

/* Table Title Bar */
.generic-table-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.generic-table-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.generic-table-title .table-icon {
  font-size: 1.1rem;
}

.generic-table-title .table-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.generic-table-ado-link {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-decoration: none;
  margin-left: 0.75rem;
  opacity: 0.8;
}

.generic-table-ado-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Table Header Bar (Showing X items, buttons, etc) */
.generic-table-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.generic-table-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.generic-table-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.generic-table-item-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.generic-table-item-count strong {
  color: var(--text-primary);
  font-weight: 600;
}

.generic-table-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.generic-table-effort-total {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.generic-table-effort-total strong {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Table Action Buttons */
.generic-table-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.generic-table-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-color: var(--accent-blue);
}

.generic-table-btn.btn-copy:hover {
  border-color: var(--accent-green);
}

.generic-table-btn.btn-export:hover {
  border-color: var(--accent-purple);
}

.generic-table-btn .btn-icon {
  font-size: 0.8rem;
}

/* Reset Sort Button in header bar */
.generic-table-header-bar .reset-sort-btn {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
}

/* Table Container with Scroll */
.generic-table-scroll-container {
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
}

/* Generic Table Base Styles */
.generic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.generic-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-tertiary);
}

.generic-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  position: relative;
  user-select: none;
}

.generic-table th.sortable-header {
  cursor: pointer;
}

.generic-table th.sortable-header:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.generic-table th .sort-indicator {
  margin-left: 0.3rem;
  font-size: 0.65rem;
  color: var(--accent-cyan);
}

.generic-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generic-table tbody tr:hover {
  background: var(--hover-bg);
}

.generic-table tbody tr.clickable-row {
  cursor: pointer;
}

.generic-table tbody tr.clickable-row:hover {
  background: rgba(34, 211, 238, 0.08);
}

/* Total Row */
.generic-table tbody tr.total-row {
  background: var(--bg-tertiary);
  font-weight: 600;
}

.generic-table tbody tr.total-row:hover {
  background: var(--bg-tertiary);
}

.generic-table tbody tr.total-row td {
  border-bottom: none;
  color: var(--text-secondary);
}

/* Work Item Link Styles */
.generic-table .work-item-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}

.generic-table .work-item-link:hover {
  text-decoration: underline;
}

/* Copy Success Toast */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-green);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 10001;
  animation: toastFadeInOut 2s ease-in-out;
}

@keyframes toastFadeInOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  15% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* ========== END GENERIC TABLE COMPONENT STYLES ========== */

/* Tasks View Styles */
.tasks-grouped-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.task-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: background 0.2s;
}

.task-group-header:hover {
  background: var(--hover-bg);
}

.toggle-icon {
  color: var(--text-secondary);
  font-size: 0.75rem;
  width: 1rem;
}

.parent-type-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.parent-type-badge.delivery-slice {
  background: var(--accent-cyan);
  color: #000;
}
.parent-type-badge.bug {
  background: #f87171;
  color: #000;
}
.parent-type-badge.issue {
  background: #fb923c;
  color: #000;
}
.parent-type-badge.feature {
  background: #a78bfa;
  color: #000;
}
.parent-type-badge.task {
  background: #60a5fa;
  color: #000;
}
.parent-type-badge.orphan {
  background: #6b7280;
  color: #fff;
}
.parent-type-badge.unknown {
  background: #374151;
  color: #fff;
}

.parent-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

.parent-link:hover {
  text-decoration: underline;
}

.parent-title {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-count {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
}

.task-group-content {
  border-top: 1px solid var(--border-color);
}

.task-group-content .work-items-table {
  margin: 0;
  border-radius: 0;
}

.orphan-group {
  border-color: #6b7280;
}

/* ========== WORK LOG SUMMARY SECTION ========== */
.worklog-summary-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.worklog-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
}
.worklog-summary-header:hover {
  background: rgba(34, 211, 238, 0.08);
}
.worklog-summary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.worklog-summary-title .section-icon {
  font-size: 1.1rem;
}
.worklog-summary-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}
.worklog-summary-header .collapse-indicator {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.worklog-summary-section.collapsed .collapse-indicator {
  transform: rotate(-90deg);
}
.worklog-summary-content {
  padding: 1rem;
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    opacity 0.2s ease-out,
    padding 0.3s ease-out;
  max-height: 3000px;
  opacity: 1;
}
.worklog-summary-section.collapsed .worklog-summary-content {
  max-height: 0;
  opacity: 0;
  padding: 0 1rem;
}
.worklog-empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}
.worklog-empty-state .empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
/* Team group within work log */
.worklog-team-group {
  margin-bottom: 1.5rem;
}
.worklog-team-group:last-child {
  margin-bottom: 0;
}
.worklog-team-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.75rem;
}
.worklog-team-name {
  font-weight: 600;
  color: var(--accent-cyan);
  font-size: 0.95rem;
}
.worklog-team-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
}
/* Engineer row within team */
.worklog-engineer-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}
.worklog-engineer-row:last-child {
  border-bottom: none;
}
.worklog-engineer-name {
  width: 140px;
  flex-shrink: 0;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.worklog-engineer-total {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
}
.worklog-tasks-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
/* Individual task entry */
.worklog-task-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: 4px;
}
.worklog-task-id {
  color: var(--accent-cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  cursor: pointer;
}
.worklog-task-id:hover {
  text-decoration: underline;
}
.worklog-task-title {
  flex: 1;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.worklog-task-days {
  font-weight: 600;
  color: var(--accent-green);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
}
.worklog-activity-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 500;
}
.worklog-activity-badge.coding {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}
.worklog-activity-badge.testing {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
}
.worklog-activity-badge.design {
  background: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
}
.worklog-activity-badge.other {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}
.worklog-date-range {
  font-size: 0.7rem;
  color: var(--text-muted);
}
/* By Team header with day labels */
.worklog-by-team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.worklog-days-header {
  display: flex;
  gap: 0.25rem;
  margin-right: 3rem; /* Align with timeline dots (offset for task-days column) */
}
.worklog-day-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  width: 2.5rem;
  text-align: center;
  padding: 0.15rem 0;
  border-radius: 3px;
  background: var(--bg-tertiary);
}
.worklog-day-label.today {
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent-cyan);
  font-weight: 600;
}
.worklog-day-label.weekend {
  opacity: 0.5;
}
/* Task timeline dots */
.worklog-task-timeline {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.worklog-task-day-dot {
  width: 2.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.worklog-task-day-dot.active {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  border-color: #3b82f6;
}
.worklog-task-day-dot.today {
  border-color: var(--accent-cyan);
}
.worklog-task-day-dot.today.active {
  background: linear-gradient(135deg, #22d3ee, #67e8f9);
  border-color: #22d3ee;
}
.worklog-task-day-dot.weekend {
  opacity: 0.5;
}
/* Summary stats row */
.worklog-stats-row {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-radius: 6px;
  margin-bottom: 1rem;
}
.worklog-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.worklog-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: "JetBrains Mono", monospace;
}
.worklog-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Work Log - By Work Item section */
.worklog-by-workitem {
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.worklog-by-team {
  margin-top: 0.5rem;
}
.worklog-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.worklog-workitem-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  flex-wrap: wrap;
}
.worklog-workitem-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}
.worklog-workitem-type {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: 100px;
}
.worklog-workitem-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}
.worklog-workitem-link {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-decoration: none;
  background: rgba(34, 211, 238, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.worklog-workitem-link:hover {
  background: rgba(34, 211, 238, 0.2);
  text-decoration: underline;
}
.worklog-more {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.worklog-no-items {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}
/* Orphan warning in By Work Item section */
.worklog-orphan-warning {
  background: rgba(239, 68, 68, 0.1);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}
.worklog-orphan-text {
  font-size: 0.8rem;
  color: #f87171;
  font-weight: 500;
}
/* Data inconsistency warning banner */
.worklog-data-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(251, 191, 36, 0.15);
  border: 1px dashed rgba(251, 191, 36, 0.5);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
}
.worklog-data-warning .warning-icon {
  font-size: 1rem;
  flex-shrink: 0;
}
.worklog-data-warning .warning-text {
  font-size: 0.75rem;
  color: #fbbf24;
  line-height: 1.4;
}
.worklog-data-warning .warning-text strong {
  color: #fcd34d;
}
/* Parent badge on task entries */
.worklog-parent-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}
.worklog-parent-badge.feature {
  background: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
}
.worklog-parent-badge.bug {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
}
.worklog-parent-badge.issue {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}
.worklog-parent-badge.delivery-slice {
  background: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
}
.worklog-parent-badge.orphan {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  font-weight: 600;
  animation: pulse-warning 2s infinite;
}
.worklog-parent-badge:hover:not(.orphan) {
  filter: brightness(1.2);
}
/* Orphan task entry styling */
.worklog-task-entry.orphan-task {
  background: rgba(239, 68, 68, 0.1);
  border-left: 2px solid #f87171;
}
@keyframes pulse-warning {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Work Log Gantt Timeline */
.worklog-timeline {
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.worklog-timeline-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.worklog-timeline-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.worklog-gantt-container {
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
}
.worklog-gantt {
  min-width: 600px;
}
/* Day headers row */
.worklog-gantt-days {
  display: flex;
  margin-left: 150px; /* Space for engineer names */
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.35rem;
}
.worklog-gantt-day {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}
.worklog-gantt-day.today {
  color: var(--accent-cyan);
  font-weight: 600;
}
.worklog-gantt-day.weekend {
  color: var(--text-muted);
  opacity: 0.6;
}
/* Team section */
.worklog-gantt-team {
  margin-bottom: 0.75rem;
}
.worklog-gantt-team:last-child {
  margin-bottom: 0;
}
.worklog-gantt-team-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
  padding-left: 0.25rem;
}
/* Engineer row */
.worklog-gantt-row {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 0.25rem;
}
.worklog-gantt-engineer {
  width: 150px;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding-right: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.worklog-gantt-bars {
  flex: 1;
  display: flex;
  position: relative;
  height: 22px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 3px;
}
/* Grid lines for days */
.worklog-gantt-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  pointer-events: none;
}
.worklog-gantt-grid-cell {
  flex: 1;
  border-right: 1px solid rgba(51, 65, 85, 0.5);
}
.worklog-gantt-grid-cell:last-child {
  border-right: none;
}
.worklog-gantt-grid-cell.weekend {
  background: rgba(51, 65, 85, 0.3);
}
/* Individual task bar */
.worklog-gantt-bar {
  position: absolute;
  height: 16px;
  top: 3px;
  border-radius: 3px;
  cursor: pointer;
  transition:
    filter 0.15s,
    transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 8px;
}
.worklog-gantt-bar:hover {
  filter: brightness(1.2);
  transform: scaleY(1.1);
  z-index: 10;
}
.worklog-gantt-bar-label {
  font-size: 0.6rem;
  color: white;
  font-weight: 500;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
/* Activity type colors */
.worklog-gantt-bar.coding {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}
.worklog-gantt-bar.testing {
  background: linear-gradient(135deg, #10b981, #34d399);
}
.worklog-gantt-bar.design {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}
.worklog-gantt-bar.other {
  background: linear-gradient(135deg, #6b7280, #9ca3af);
}
/* Orphan task bar */
.worklog-gantt-bar.orphan {
  border: 2px solid #f87171;
  box-shadow: 0 0 4px rgba(248, 113, 113, 0.5);
}
/* Data inconsistency bar (effort > date range) */
.worklog-gantt-bar.inconsistent {
  border: 2px dashed #fbbf24;
  box-shadow: 0 0 4px rgba(251, 191, 36, 0.5);
}
.worklog-gantt-bar.inconsistent::after {
  content: "⚠";
  position: absolute;
  right: -2px;
  top: -8px;
  font-size: 10px;
}
/* Parent type accent (left border) */
.worklog-gantt-bar.parent-feature {
  border-left: 3px solid #a78bfa;
}
.worklog-gantt-bar.parent-bug {
  border-left: 3px solid #f87171;
}
.worklog-gantt-bar.parent-issue {
  border-left: 3px solid #fb923c;
}
.worklog-gantt-bar.parent-delivery-slice {
  border-left: 3px solid #22d3ee;
}
/* Tooltip */
.worklog-gantt-tooltip {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  pointer-events: none;
  max-width: 280px;
}
.worklog-gantt-tooltip-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.worklog-gantt-tooltip-meta {
  color: var(--text-muted);
  font-size: 0.7rem;
}
/* Legend */
.worklog-gantt-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.worklog-gantt-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.worklog-gantt-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.worklog-gantt-legend-color.coding {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}
.worklog-gantt-legend-color.testing {
  background: linear-gradient(135deg, #10b981, #34d399);
}
.worklog-gantt-legend-color.design {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}
.worklog-gantt-legend-color.other {
  background: linear-gradient(135deg, #6b7280, #9ca3af);
}

/* Divergence styling */
.divergence-value {
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}

.divergence-value.on-target {
  color: #22c55e;
}

.divergence-value.over {
  color: #ef4444;
}

.divergence-value.under {
  color: #eab308;
}

/* Accent stat cards */
.stat-card.accent-green .stat-value {
  color: #22c55e;
}

.stat-card.accent-red .stat-value {
  color: #ef4444;
}

.stat-card.accent-yellow .stat-value {
  color: #eab308;
}

.accent-red {
  color: #ef4444;
  font-weight: 600;
}

/* Section divider */
.section-divider {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-bottom: 1rem;
}

.section-divider h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

/* Org Chart Styles */
.orgchart-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  min-width: 280px;
  flex: 1;
  max-width: 400px;
}

.team-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.team-lead-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
}

.team-lead-info h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.team-lead-info .role {
  color: var(--accent-purple);
  font-size: 0.8rem;
  font-weight: 500;
}

.team-members {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.member-name {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.member-count {
  background: var(--accent-cyan);
  color: #000;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.team-lead-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-purple);
}

.team-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  margin-left: auto;
}

.member-team-tag {
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 500;
  margin-left: auto;
}

.member-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.member-photo.grayscale,
.member-avatar.grayscale {
  filter: grayscale(100%);
  opacity: 0.6;
}

.former-members-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.former-members-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.team-member.former .member-name {
  color: var(--text-muted);
  font-style: italic;
}

.team-members.former {
  opacity: 0.7;
}

/* Definitions panel */
.definitions-panel {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.definitions-title {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.definition-item {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.definition-item strong {
  color: var(--text-secondary);
}

.section-divider {
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.section-divider h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.section-header {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  white-space: nowrap;
}

.filter-group input[type="date"],
.filter-group select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.875rem;
}

.filter-group input[type="date"]:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

/* Multi-select dropdown with checkboxes */
.multi-select-dropdown {
  position: relative;
  min-width: 140px;
}

.multi-select-display {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.multi-select-display:hover {
  border-color: var(--accent-cyan);
}

.dropdown-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.multi-select-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-top: 2px;
  z-index: 1000;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.multi-select-options.show {
  display: block;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.checkbox-option:hover {
  background: var(--bg-tertiary);
}

.checkbox-option input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  width: 14px;
  height: 14px;
}

.checkbox-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.25rem 0;
}

.select-all-option {
  background: var(--bg-tertiary);
}

/* Team Details Section */
.team-details-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--accent-cyan);
}

.team-details-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.team-details-section .section-header h3 {
  margin: 0;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-details-section .close-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.team-details-section .close-btn:hover {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-red);
}

.team-filters-bar {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.doughnut-container {
  max-height: 250px;
}

.effort-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.effort-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 120px;
}

.effort-card .effort-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.effort-card .effort-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.effort-card .effort-count {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Team stat card with lead photo */
.team-stat-card {
  position: relative;
}

.team-stat-card.all-teams-card {
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    rgba(6, 182, 212, 0.1) 100%
  );
  border: 2px solid var(--accent-cyan);
}

.team-lead-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.team-lead-photo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.team-lead-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Calculation definition */
.calculation-definition {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.definition-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.definition-toggle:hover {
  color: var(--accent-cyan);
}

.toggle-icon {
  transition: transform 0.2s;
}

.definition-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

.definition-content {
  padding: 0 1rem 1rem 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.definition-content p {
  margin: 0.5rem 0;
}

.definition-content strong {
  color: var(--text-primary);
}

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

.filter-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--hover-bg);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.chart-card.full-width {
  grid-column: 1 / -1;
  margin-bottom: 1.5rem;
}

.chart-container.tall {
  height: 350px;
}

/* Trend indicator colors */
.trend-up {
  color: var(--accent-red) !important;
}

.trend-down {
  color: var(--accent-green) !important;
}

.trend-neutral {
  color: var(--text-secondary) !important;
}

/* ==================== MODAL STYLES (from part4) ==================== */
.feature-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.feature-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 90vw;
  max-height: 85vh;
  width: 1000px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.feature-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-elevated);
  border-radius: 12px 12px 0 0;
}

.feature-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.feature-modal-close:hover {
  color: var(--text-primary);
}

.feature-modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#feature-modal-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.feature-modal-table-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.feature-modal-table-header {
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.feature-modal-table-header table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.feature-modal-table-header th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-secondary);
}

.feature-modal-table-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.feature-modal-table-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.feature-modal-table-body td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.feature-modal-table-body tr:hover td {
  background: var(--bg-hover);
}

/* Column widths for both header and body tables */
.feature-modal-col-id {
  width: 60px;
}
.feature-modal-col-title {
  width: auto;
}
.feature-modal-col-state {
  width: 100px;
}
.feature-modal-col-iteration {
  width: 120px;
}
.feature-modal-col-team {
  width: 100px;
}
.feature-modal-col-effort {
  width: 60px;
}
.feature-modal-col-owner {
  width: 140px;
}

.feature-modal-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

/* Effort summary in modal */
.feature-modal-effort-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.effort-team-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.effort-team-value {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 1rem;
}

.effort-total-label {
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.effort-total-value {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Grayed out rows for other teams */
.other-team-row td {
  opacity: 0.45;
}

.other-team-row:hover td {
  opacity: 0.6;
}

.other-team-row td a {
  color: var(--text-muted);
}

.other-team-row .state-badge {
  opacity: 0.7;
}
.issue-rel-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.issue-rel-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.issue-rel-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.issue-rel-modal-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.issue-rel-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.issue-rel-category-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(100, 116, 139, 0.3);
  color: var(--text-secondary);
}

.issue-rel-category-badge.enhancement-request {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}

.issue-rel-category-badge.bug {
  background: rgba(251, 146, 60, 0.2);
  color: var(--accent-orange);
}

.issue-rel-category-badge.task {
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent-purple);
}

.issue-rel-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.issue-rel-modal-close:hover {
  color: var(--text-primary);
}

.issue-rel-modal-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  padding: 1rem 1.25rem;
}

#issue-rel-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  max-height: calc(80vh - 100px);
}

.issue-rel-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.issue-rel-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-color);
}

.issue-rel-section-header .section-icon {
  font-size: 1rem;
}

.issue-rel-section-header .section-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.issue-rel-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.issue-rel-item {
  display: grid;
  grid-template-columns: 60px 80px 1fr 100px;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border-radius: 4px;
  align-items: center;
  font-size: 0.8rem;
}

.issue-rel-item:hover {
  background: var(--bg-hover);
}

.issue-rel-item-id a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}

.issue-rel-item-id a:hover {
  text-decoration: underline;
}

.issue-rel-item-type {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-secondary);
  text-align: center;
}

.issue-rel-item-type.type-feature {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}

.issue-rel-item-type.type-delivery-slice {
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent-purple);
}

.issue-rel-item-type.type-bug {
  background: rgba(251, 146, 60, 0.2);
  color: var(--accent-orange);
}

.issue-rel-item-type.type-task {
  background: rgba(52, 211, 153, 0.2);
  color: var(--accent-green);
}

.issue-rel-item-type.type-issue {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-yellow);
}

.issue-rel-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.issue-rel-item-state {
  text-align: right;
}

.issue-rel-item-state .state-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
}

.issue-rel-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.issue-rel-comment {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.25rem;
  padding-left: 60px;
}

/* Parent section has a different header color */
.issue-rel-section.parent-section .issue-rel-section-header {
  color: var(--accent-orange);
}

.issue-rel-section.children-section .issue-rel-section-header {
  color: var(--accent-cyan);
}

.issue-rel-section.related-section .issue-rel-section-header {
  color: var(--accent-purple);
}
/* Generic Work Item Details Modal Styles */
.work-item-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.work-item-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 95%;
  max-width: 1100px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.work-item-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  border-radius: 12px 12px 0 0;
}

.work-item-modal-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.work-item-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-item-type-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(100, 116, 139, 0.3);
  color: var(--text-secondary);
}

.work-item-type-badge.type-feature {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}

.work-item-type-badge.type-delivery-slice {
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent-purple);
}

.work-item-type-badge.type-bug {
  background: rgba(248, 113, 113, 0.2);
  color: var(--accent-red);
}

.work-item-type-badge.type-issue {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-yellow);
}

.work-item-type-badge.type-task {
  background: rgba(52, 211, 153, 0.2);
  color: var(--accent-green);
}

.work-item-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.work-item-modal-close:hover {
  color: var(--text-primary);
}

.work-item-modal-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
  padding: 1rem 1.5rem;
  gap: 1.5rem;
}

#work-item-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Modal Section Styles */
.work-item-modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.work-item-modal-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.work-item-modal-section-header .section-icon {
  font-size: 1rem;
}

.work-item-modal-section-header .section-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.work-item-modal-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Delivery Slices Section */
.delivery-slices-section .work-item-modal-section-header {
  color: var(--accent-purple);
}

.delivery-slices-effort-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  font-size: 0.8rem;
}

.effort-filter-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.effort-filter-value {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.9rem;
}

.effort-total-label {
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.effort-total-value {
  color: var(--text-secondary);
  font-weight: 600;
}

.delivery-slices-table-container {
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.delivery-slices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  table-layout: fixed;
}

.delivery-slices-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
  z-index: 1;
}

.delivery-slices-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.delivery-slices-table tr:hover td {
  background: var(--hover-bg);
}

.delivery-slices-table .other-team-row td {
  opacity: 0.45;
}

.delivery-slices-table .other-team-row:hover td {
  opacity: 0.6;
}

/* Modal column widths */
.modal-col-id {
  width: 60px;
}
.modal-col-title {
  width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-col-state {
  width: 100px;
}
.modal-col-iteration {
  width: 110px;
}
.modal-col-team {
  width: 100px;
}
.modal-col-effort {
  width: 55px;
}
.modal-col-owner {
  width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Relationships Section */
.relationships-section .work-item-modal-section-header {
  color: var(--accent-cyan);
}

.relationships-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.relationship-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.relationship-group-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.relationship-group-header .rel-icon {
  font-size: 0.85rem;
}

.relationship-group-header .rel-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.parent-group .relationship-group-header {
  color: var(--accent-orange);
}

.children-group .relationship-group-header {
  color: var(--accent-cyan);
}

.related-group .relationship-group-header {
  color: var(--accent-purple);
}

.relationship-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.relationship-item {
  display: grid;
  grid-template-columns: 60px 85px 1fr 100px;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  align-items: center;
  font-size: 0.8rem;
}

.relationship-item:hover {
  background: var(--hover-bg);
}

.rel-item-id a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}

.rel-item-id a:hover {
  text-decoration: underline;
}

.rel-item-type {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}

.rel-item-type.type-feature {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}
.rel-item-type.type-delivery-slice {
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent-purple);
}
.rel-item-type.type-bug {
  background: rgba(248, 113, 113, 0.2);
  color: var(--accent-red);
}
.rel-item-type.type-task {
  background: rgba(52, 211, 153, 0.2);
  color: var(--accent-green);
}
.rel-item-type.type-issue {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-yellow);
}

.rel-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.rel-item-state {
  text-align: right;
}

.rel-item-state .state-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
}

.relationship-comment {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.15rem;
  padding-left: 60px;
}
