/* 1ODOM - Outcome Driven Operating Model Tool */

:root {
  /* Dark Theme (default) */
  --bg-body: #010a1c;
  --bg-panel: rgba(13, 25, 46, 0.95);
  --bg-card: rgba(18, 31, 56, 0.9);
  --bg-card-hover: rgba(25, 40, 70, 0.95);
  --bg-input: rgba(10, 20, 40, 0.8);
  --text-main: #f5f9ff;
  --text-muted: #8a9bb5;
  --text-strong: #ffffff;
  --border-soft: rgba(148, 163, 184, 0.25);
  --border-strong: rgba(148, 163, 184, 0.4);
  --accent: #e53935;
  --accent-soft: rgba(229, 57, 53, 0.2);
  --accent-alt: #38bdf8;
  --accent-alt-soft: rgba(56, 189, 248, 0.15);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --header-height: 64px;
  --sidebar-width: 280px;
}

body[data-theme='light'] {
  --bg-body: #f0f4f8;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-strong: #0f172a;
  --border-soft: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --accent: #dc2626;
  --accent-soft: rgba(220, 38, 38, 0.1);
  --accent-alt: #0284c7;
  --accent-alt-soft: rgba(2, 132, 199, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.1);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
}

/* Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

/* App Shell */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  box-shadow: 0 0 20px var(--accent-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand-tagline {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.nav-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  color: var(--text-main);
  background: var(--bg-card);
}

.nav-btn.active {
  color: var(--text-main);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

/* Header Search */
.header-search {
  display: flex;
  align-items: center;
  gap: 4px;
}

.global-search-input {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13px;
  width: 160px;
  transition: all 0.2s;
}

.global-search-input:focus {
  width: 200px;
  outline: none;
  border-color: var(--accent-alt);
  background: var(--bg-card);
}

.global-search-input::placeholder {
  color: var(--text-muted);
}

.btn-icon-search {
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-search:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* New Item Dropdown */
.new-item-dropdown {
  position: relative;
}

.new-item-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 140px;
  z-index: 200;
  display: none;
}

.new-item-menu.open {
  display: block;
}

.new-item-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.new-item-option:first-child {
  border-radius: 8px 8px 0 0;
}

.new-item-option:last-child {
  border-radius: 0 0 8px 8px;
}

.new-item-option:hover {
  background: var(--bg-card-hover);
}

/* Buttons */
.btn-primary {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), #ff5252);
  border: none;
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px var(--accent-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-soft);
}

.btn-secondary {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-danger {
  padding: 8px 16px;
  background: var(--danger);
  border: 1px solid var(--danger);
  color: white;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.form-actions-right {
  display: flex;
  gap: 8px;
}

.form-actions:has(.btn-danger) {
  justify-content: space-between;
}

.theme-toggle {
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-alt), #06b6d4);
  border: 2px solid var(--border-soft);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.user-avatar:hover {
  border-color: var(--accent-alt);
  transform: scale(1.05);
}

.avatar-initials {
  text-transform: uppercase;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 200;
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.dropdown-email {
  font-size: 12px;
  color: var(--text-muted);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 0;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--bg-card);
}

.dropdown-item:first-of-type {
  border-radius: 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 10px 10px;
}

.dropdown-item-danger {
  color: var(--accent) !important;
}

.dropdown-item-danger:hover {
  background: var(--accent-soft);
}

/* App Body */
.app-body {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-panel);
  border-right: 1px solid var(--border-soft);
  padding: 20px;
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-stats-section {
  margin-top: auto;
  margin-bottom: 0;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Sidebar Meta (Date Started, Days in Build, Due Date) */
.sidebar-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.sidebar-meta:empty {
  display: none;
}

.sidebar-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.sidebar-meta-label {
  color: var(--text-muted);
}

.sidebar-meta-value {
  font-weight: 500;
  color: var(--text-main);
}

.sidebar-meta-value.days-count {
  color: var(--accent-alt);
  font-weight: 700;
  font-size: 16px;
}

.sidebar-meta-value.due-date {
  color: var(--accent);
  font-weight: 600;
}

.sidebar-meta-row.meta-hierarchy-row {
  align-items: flex-start !important;
}

.sidebar-meta-row.meta-hierarchy-row .sidebar-meta-label {
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 0;
  line-height: 1.3;
}

.sidebar-meta-value.meta-hierarchy {
  font-size: 10px;
  font-weight: 400;
  text-align: right;
  max-width: 140px;
  line-height: 1.3;
  align-self: flex-start;
}

/* Active Outcome Card */
.active-outcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px;
}

.active-outcome-card.has-outcome {
  border-color: var(--accent);
  background: var(--accent-soft);
  transition: transform 0.15s, box-shadow 0.15s;
}

.active-outcome-card.has-outcome:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.active-outcome-card .outcome-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.active-outcome-card .outcome-definition {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.active-outcome-card .outcome-hypothesis {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 8px;
  padding-bottom: 8px;
  border-top: 1px solid var(--border-soft);
}

.active-outcome-card .outcome-hypothesis-label {
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  display: block;
  margin-bottom: 4px;
}

.active-outcome-card .outcome-signals {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

.active-outcome-card .outcome-signals-label {
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  display: block;
  margin-bottom: 4px;
}

.active-outcome-card .outcome-signals-list {
  margin: 0;
  padding-left: 18px;
  list-style-type: disc;
  list-style-position: outside;
}

.active-outcome-card .outcome-signals-list li {
  margin-bottom: 4px;
  padding-left: 0;
  line-height: 1.4;
}

/* Outcome Detail View */
.outcome-detail-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.outcome-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.outcome-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
}

.outcome-search-input {
  flex: 1;
  max-width: 300px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13px;
}

.outcome-search-input:focus {
  outline: none;
  border-color: var(--accent-alt);
}

.outcome-detail-content {
  flex: 1;
  overflow-y: auto;
}

/* Outcome Info Card */
.outcome-info-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.outcome-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.outcome-info-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.outcome-ref-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-alt);
  font-family: monospace;
}

.outcome-info-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.outcome-info-state {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.outcome-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.outcome-info-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.outcome-info-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.outcome-info-value {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}

.outcome-info-value.empty {
  color: var(--text-muted);
  font-style: italic;
}

/* Outcome Related Items Section */
.outcome-related-section {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.outcome-related-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.outcome-related-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.outcome-related-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-sidebar);
  padding: 2px 8px;
  border-radius: 10px;
}

.outcome-related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outcome-related-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.outcome-related-item-ref {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-alt);
  font-family: monospace;
  flex-shrink: 0;
}

.outcome-related-item-content {
  flex: 1;
}

.outcome-related-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.outcome-related-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.outcome-related-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 10px;
  text-align: center;
}

.empty-state {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-alt);
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px;
  padding-bottom: 72px; /* Account for footer */
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  margin-bottom: 24px;
}

.view-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.view-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

/* Pipeline Board */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  min-height: calc(100vh - 200px);
}

.pipeline-column {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.column-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column-header h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.column-count {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.column-cards {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Outcome Cards */
.outcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.outcome-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.outcome-card.in-progress {
  border-color: var(--accent);
  border-width: 2px;
}

.outcome-card-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.outcome-card-theme {
  font-size: 10px;
  color: var(--accent-alt);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.outcome-card-definition {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.outcome-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

.outcome-card-signals {
  font-size: 10px;
  color: var(--text-muted);
}

.outcome-card-endstate {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.outcome-card-endstate.completed {
  background: var(--success-soft);
  color: var(--success);
}

.outcome-card-endstate.retired {
  background: var(--warning-soft);
  color: var(--warning);
}

.outcome-card-endstate.adjusted {
  background: var(--accent-alt-soft);
  color: var(--accent-alt);
}

/* Empty State */
.empty-state-large {
  text-align: center;
  padding: 60px 40px;
  color: var(--text-muted);
}

.empty-state-large h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-main);
}

/* Portfolio View */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.portfolio-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
}

.portfolio-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.breakdown-list, .decisions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.breakdown-item, .decision-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 6px;
}

.breakdown-name, .decision-name {
  font-size: 13px;
}

.breakdown-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-alt);
}

/* Archive View */
.archive-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--border-strong);
}

.filter-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text-main);
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.archive-item:hover {
  border-color: var(--border-strong);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-large {
  max-width: 720px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg-panel);
  z-index: 10;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 20px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.modal-body {
  padding: 24px;
}

/* Forms */
.form-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent-alt);
}

.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.form-section h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.modal-large .modal-content {
  max-width: 700px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

/* Signals List */
.signals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.signal-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.signal-item input {
  flex: 1;
}

.signal-remove {
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
}

.signal-remove:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Assessment */
.assessment-info {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}

.assessment-signals {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assessment-signal {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 14px;
}

.assessment-signal-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
}

.assessment-signal-input textarea {
  width: 100%;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

/* End State Options */
.end-state-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.end-state-option {
  cursor: pointer;
}

.end-state-option input {
  display: none;
}

.end-state-card {
  padding: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-soft);
  border-radius: 10px;
  transition: all 0.2s;
}

.end-state-card strong {
  display: block;
  margin-bottom: 4px;
}

.end-state-card p {
  font-size: 12px;
  color: var(--text-muted);
}

.end-state-option input:checked + .end-state-card.completed {
  border-color: var(--success);
  background: var(--success-soft);
}

.end-state-option input:checked + .end-state-card.retired {
  border-color: var(--warning);
  background: var(--warning-soft);
}

.end-state-option input:checked + .end-state-card.adjusted {
  border-color: var(--accent-alt);
  background: var(--accent-alt-soft);
}

/* Account Modal */
.account-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-alt), #06b6d4);
  color: white;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Settings Modal */
.settings-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

.settings-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent-alt);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item span {
  font-size: 14px;
  color: var(--text-main);
}

.settings-item select {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13px;
}

.settings-item-danger span {
  color: var(--accent);
}

.btn-danger {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.btn-danger:hover {
  background: var(--accent) !important;
  color: white !important;
}

/* Team Modal */
.team-members {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.team-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-alt), #06b6d4);
  color: white;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.team-member-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.team-member-role {
  font-size: 12px;
  color: var(--text-muted);
}

.team-member-badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-member-badge.owner {
  background: var(--accent-soft);
  color: var(--accent);
}

.team-invite {
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.team-invite h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent-alt);
}

.team-invite .form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

/* Help Modal */
.help-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

.help-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.help-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent-alt);
}

.help-section p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 8px;
}

.help-section p:last-child {
  margin-bottom: 0;
}

.help-link {
  display: block;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--accent-alt);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.help-link:last-child {
  margin-bottom: 0;
}

.help-link:hover {
  border-color: var(--accent-alt);
  background: var(--accent-alt-soft);
}

/* Outcome Panel */
.outcome-panel {
  position: fixed;
  top: var(--header-height);
  right: -500px;
  width: 480px;
  height: calc(100vh - var(--header-height));
  background: var(--bg-panel);
  border-left: 1px solid var(--border-soft);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}

.outcome-panel.open {
  right: 0;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.panel-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 18px;
  border-radius: 4px;
  cursor: pointer;
}

.panel-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.panel-section {
  margin-bottom: 20px;
}

.panel-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.panel-section-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

.panel-section-content p {
  margin-bottom: 8px;
}

.panel-actions {
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-actions .btn-primary,
.panel-actions .btn-secondary {
  flex: 1;
}

/* Footer */
.app-footer {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 48px;
  border-top: 1px solid var(--border-soft);
  padding: 0 24px;
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  z-index: 90;
}

.app-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.footer-links a:hover {
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 1200px) {
  .pipeline-board {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
  }

  .pipeline-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-footer {
    left: 0;
  }
}

@media (max-width: 600px) {
  .header-nav {
    display: none;
  }

  .pipeline-board {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Portfolio View Styles
   ============================================ */

.portfolio-header {
  margin-bottom: 24px;
}

.portfolio-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.portfolio-title-row h2 {
  font-size: 28px;
  font-weight: 600;
}

.portfolio-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 14px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-select {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
  min-width: 120px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.portfolio-content {
  /* Main content area */
}

.theme-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Theme Card */
.theme-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.theme-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.theme-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.theme-card-intent {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.theme-card-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
  font-size: 13px;
}

.theme-card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-card-meta-label {
  color: var(--text-muted);
}

.theme-card-meta-value {
  color: var(--text-main);
  font-weight: 500;
}

.theme-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 12px;
}

.theme-card-stat {
  text-align: center;
}

.theme-card-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-alt);
  margin-bottom: 2px;
}

.theme-card-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.theme-card-outcomes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.outcome-state-pill {
  padding: 4px 8px;
  background: var(--bg-card);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.outcome-state-pill .count {
  font-weight: 600;
  color: var(--text-main);
}

.theme-card-evidence {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.evidence-pill {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.evidence-pill.strong {
  background: var(--success-soft);
  color: var(--success);
}

.evidence-pill.mixed {
  background: var(--warning-soft);
  color: var(--warning);
}

.evidence-pill.weak {
  background: var(--accent-soft);
  color: var(--accent);
}

.theme-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.theme-card-actions {
  display: flex;
  gap: 8px;
}

.theme-card-actions .btn-link {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--accent-alt);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.theme-card-actions .btn-link:hover {
  color: var(--accent);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active,
.status-badge[data-status="Active"] {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.paused,
.status-badge[data-status="Paused"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-badge.retired,
.status-badge[data-status="Retired"] {
  background: var(--bg-card);
  color: var(--text-muted);
}

/* ============================================
   Theme Detail View Styles
   ============================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}

.breadcrumb a {
  color: var(--accent-alt);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 500;
}

.theme-detail-header {
  margin-bottom: 20px;
}

.theme-detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.theme-detail-title-row h2 {
  font-size: 28px;
  font-weight: 600;
}

.theme-intent {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 800px;
}

.theme-detail-strip {
  display: flex;
  gap: 32px;
  padding: 16px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-bottom: 24px;
}

.strip-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.strip-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.strip-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-alt);
}

.strip-value-alert {
  color: var(--accent);
}

.theme-detail-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.theme-detail-main {
  min-width: 0;
}

.theme-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px;
}

.sidebar-card h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 600;
}

/* Initiative Row in Theme Detail */
.initiatives-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.initiative-row {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.initiative-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.initiative-row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.initiative-row-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.initiative-row-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.initiative-row-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.initiative-row-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.initiative-row-stat-label {
  color: var(--text-muted);
}

.initiative-row-stat-value {
  color: var(--text-main);
  font-weight: 500;
}

/* Rollup Map */
.rollup-map {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rollup-map-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 12px;
}

.rollup-map-item-name {
  color: var(--text-main);
}

.rollup-map-item-count {
  font-weight: 600;
  color: var(--accent-alt);
}

/* Decisions Queue */
.decisions-queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decision-queue-item {
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.decision-queue-item:hover {
  background: var(--bg-card-hover);
}

.decision-queue-item-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 2px;
}

.decision-queue-item-initiative {
  font-size: 10px;
  color: var(--text-muted);
}

/* Recent Assessments */
.recent-assessments {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assessment-item {
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 6px;
}

.assessment-item-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
}

.assessment-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}

.assessment-item-date {
  color: var(--text-muted);
}

.assessment-decision {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.assessment-decision.scale {
  background: var(--success-soft);
  color: var(--success);
}

.assessment-decision.adjust {
  background: var(--accent-alt-soft);
  color: var(--accent-alt);
}

.assessment-decision.stop {
  background: var(--accent-soft);
  color: var(--accent);
}

.assessment-decision.hold {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ============================================
   Initiative Detail View Styles
   ============================================ */

.initiative-detail-header {
  margin-bottom: 24px;
}

.initiative-detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.initiative-detail-title-row h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.initiative-intent {
  font-size: 14px;
  color: var(--text-muted);
}

.initiative-header-actions {
  display: flex;
  gap: 8px;
}

.initiative-meta-row {
  display: flex;
  gap: 32px;
  padding: 16px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

/* Outcome Pipeline Board */
.outcome-pipeline-section {
  margin-top: 24px;
}

.outcome-pipeline-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.outcome-pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  min-height: calc(100vh - 400px);
}

.outcome-pipeline-board .pipeline-column {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.outcome-pipeline-board .column-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.outcome-pipeline-board .column-header h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.outcome-pipeline-board .column-count {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.outcome-pipeline-board .column-cards {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.column-build {
  border-color: var(--accent) !important;
}

.column-build .column-header {
  background: var(--accent-soft);
}

.column-assessment {
  border-color: var(--warning) !important;
}

.column-assessment .column-header {
  background: var(--warning-soft);
}

.column-closed {
  border-color: var(--success) !important;
}

.column-closed .column-header {
  background: var(--success-soft);
}

/* Outcome Card (in initiative pipeline) */
.outcome-card-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.outcome-card-mini:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.outcome-card-mini-statement {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

.outcome-card-mini-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.outcome-card-mini-signals {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.signal-mini {
  padding: 2px 6px;
  background: var(--bg-panel);
  border-radius: 3px;
  font-size: 9px;
  color: var(--text-muted);
}

.blocked-pill {
  display: inline-block;
  padding: 2px 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.outcome-card-mini-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
  font-size: 10px;
}

.outcome-age {
  color: var(--text-muted);
}

.priority-rank {
  font-weight: 600;
  color: var(--accent-alt);
}

/* Decision Queue Panel */
.decision-queue-panel {
  position: fixed;
  top: var(--header-height);
  right: -400px;
  width: 380px;
  height: calc(100vh - var(--header-height));
  background: var(--bg-panel);
  border-left: 1px solid var(--border-soft);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}

.decision-queue-panel.open {
  right: 0;
}

/* Empty States */
.empty-state-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.empty-state-centered h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.empty-state-centered p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Responsive adjustments for new views */
@media (max-width: 1200px) {
  .outcome-pipeline-board {
    grid-template-columns: repeat(4, 1fr);
  }

  .theme-detail-content {
    grid-template-columns: 1fr;
  }

  .theme-detail-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-card {
    flex: 1;
    min-width: 250px;
  }
}

@media (max-width: 900px) {
  .theme-card-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .outcome-pipeline-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .initiative-meta-row {
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .portfolio-filters {
    flex-direction: column;
  }

  .search-box {
    max-width: none;
  }

  .theme-detail-strip {
    flex-direction: column;
    gap: 16px;
  }

  .outcome-pipeline-board {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Team Pulse View Styles
   ============================================ */

.pulse-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  min-height: calc(100vh - var(--header-height) - 80px);
}

.pulse-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pulse-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pulse-section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.pulse-section-title h2 {
  font-size: 22px;
  font-weight: 600;
}

.pulse-section-title h3 {
  font-size: 16px;
  font-weight: 600;
}

.pulse-outcome-context {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.pulse-section-actions {
  display: flex;
  gap: 8px;
}

/* Build Items Board (Kanban) */
.build-items-board {
  display: flex;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}

.build-column {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.build-column.is-in-progress {
  border-color: var(--accent);
}

.build-column.is-in-progress .build-column-header {
  background: var(--accent-soft);
}

.build-column-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.build-column-header h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.in-progress-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.build-column-count {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.build-column-cards {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}

.build-column-cards.drag-over {
  background: var(--accent-alt-soft);
  border-radius: 0 0 9px 9px;
}

/* Build Item Card */
.build-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  cursor: grab;
  transition: all 0.2s;
}

.build-item-card:hover {
  border-color: var(--accent-alt);
  box-shadow: var(--shadow);
}

.build-item-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.build-item-card.blocked {
  border-left: 3px solid var(--accent);
}

.build-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

.build-item-description {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.build-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.build-item-blocked-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.build-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.build-item-card:hover .build-item-actions {
  opacity: 1;
}

.build-item-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 4px;
}

.build-item-action-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

/* Outcome Notes Section */
.pulse-notes-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px;
}

.pulse-notes-section .pulse-section-header {
  margin-bottom: 16px;
}

.notes-count {
  font-size: 12px;
  color: var(--text-muted);
}

.notes-input-area {
  margin-bottom: 16px;
}

.notes-input-area textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
}

.notes-input-area textarea:focus {
  outline: none;
  border-color: var(--accent-alt);
}

.notes-input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 12px;
}

.notes-input-left {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.note-type-select {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 12px;
  min-width: 110px;
  cursor: pointer;
}

.note-type-select:focus {
  outline: none;
  border-color: var(--accent-alt);
}

/* File Attachment */
.notes-file-attachment {
  flex: 1;
}

.file-drop-zone {
  border: 1px dashed var(--border-soft);
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
  transition: all 0.2s;
  background: var(--bg-input);
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: var(--accent-alt);
  background: var(--accent-soft);
}

.drop-zone-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.file-browse-link {
  color: var(--accent-alt);
  cursor: pointer;
  text-decoration: underline;
}

.file-browse-link:hover {
  color: var(--accent);
}

.file-input-hidden {
  display: none;
}

.attached-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
}

.file-icon {
  font-size: 14px;
}

.file-name {
  flex: 1;
  font-size: 11px;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.file-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.file-remove-btn:hover {
  color: var(--danger);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Note Card */
.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 14px;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.note-timestamp {
  font-size: 11px;
  color: var(--text-muted);
}

.note-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.note-card:hover .note-actions {
  opacity: 1;
}

.note-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 11px;
}

.note-action-btn:hover {
  color: var(--accent);
}

.note-content {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-artifact {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.note-artifact a {
  font-size: 12px;
  color: var(--accent-alt);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-artifact a:hover {
  text-decoration: underline;
}

.note-artifact-icon {
  font-size: 14px;
}

/* Note Type Badge */
.note-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-type-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.note-type-badge .badge-icon {
  font-size: 10px;
}

/* Note File Attachment in displayed notes */
.note-file-attachment {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--bg-sidebar);
  border-radius: 6px;
  border: 1px solid var(--border-soft);
}

.note-file-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.note-file-name {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-file-download {
  font-size: 11px;
  color: var(--accent-alt);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  transition: all 0.2s;
}

.note-file-download:hover {
  background: var(--accent-alt);
  color: white;
}

/* Pulse Sidebar */
.pulse-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.pulse-sidebar-section {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px;
}

.pulse-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pulse-sidebar-header h3 {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.tdq-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tdq-subtitle-link {
  font-size: 10px;
  color: var(--accent-alt);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.2s;
}

.tdq-subtitle-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.btn-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--accent-alt-soft);
  border-color: var(--accent-alt);
  color: var(--accent-alt);
}

/* TDQ List */
.tdq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.tdq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.tdq-item:hover {
  border-color: var(--accent-alt);
  background: var(--bg-card-hover);
}

.tdq-item.has-due-date {
  border-left: 3px solid var(--warning);
}

.tdq-item.overdue {
  border-left-color: var(--accent);
}

.tdq-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.tdq-item-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.3;
}

.tdq-item-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tdq-item-status.pending {
  background: var(--bg-card);
  color: var(--text-muted);
}

.tdq-item-status.in-progress {
  background: var(--accent-alt-soft);
  color: var(--accent-alt);
}

.tdq-item-status.done {
  background: var(--success-soft);
  color: var(--success);
}

.tdq-item-meta {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--text-muted);
}

.tdq-item-requester,
.tdq-item-due {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tdq-item-due {
  color: var(--accent);
  font-weight: 600;
}

.tdq-item-due.overdue {
  color: var(--accent);
  font-weight: 600;
}

/* TDQ Bug Item */
.tdq-item.is-bug {
  position: relative;
}

.tdq-item .bug-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 14px;
  color: var(--accent);
}

/* Risks List */
.risks-list,
.dependencies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-item,
.dependency-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.risk-item:hover,
.dependency-item:hover {
  border-color: var(--accent-alt);
  background: var(--bg-card-hover);
}

.risk-item.severity-high {
  border-left: 3px solid var(--accent);
}

.risk-item.severity-medium {
  border-left: 3px solid var(--warning);
}

.risk-item.severity-low {
  border-left: 3px solid var(--success);
}

.risk-item-header,
.dependency-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.risk-item-title,
.dependency-item-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.3;
}

.risk-severity,
.dependency-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.risk-severity.high {
  background: var(--accent-soft);
  color: var(--accent);
}

.risk-severity.medium {
  background: var(--warning-soft);
  color: var(--warning);
}

.risk-severity.low {
  background: var(--success-soft);
  color: var(--success);
}

.dependency-status.waiting {
  background: var(--bg-card);
  color: var(--text-muted);
}

.dependency-status.in-progress {
  background: var(--accent-alt-soft);
  color: var(--accent-alt);
}

.dependency-status.resolved {
  background: var(--success-soft);
  color: var(--success);
}

.dependency-status.blocked {
  background: var(--accent-soft);
  color: var(--accent);
}

.risk-mitigation,
.dependency-owner {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Drawer */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: none;
}

.drawer.open {
  display: flex;
}

.drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.drawer-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.drawer-actions {
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* TDQ Detail */
.tdq-detail-section {
  margin-bottom: 20px;
}

.tdq-detail-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.tdq-detail-value {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
}

.tdq-detail-link {
  color: var(--accent-alt);
  text-decoration: none;
}

.tdq-detail-link:hover {
  text-decoration: underline;
}

/* Column Configuration */
.column-config-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.column-config-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.column-config-item.is-in-progress {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.column-config-drag {
  color: var(--text-muted);
  cursor: grab;
}

.column-config-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.column-config-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.column-config-in-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.column-config-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
}

.column-config-remove:hover {
  color: var(--accent);
}

.column-config-presets {
  margin-bottom: 20px;
}

.preset-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Empty States */
.pulse-empty-state {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1200px) {
  .pulse-layout {
    grid-template-columns: 1fr 280px;
  }

  .build-column {
    min-width: 180px;
  }
}

@media (max-width: 900px) {
  .pulse-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .pulse-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .pulse-sidebar-section {
    flex: 1;
    min-width: 280px;
  }

  .build-items-board {
    overflow-x: auto;
    padding-bottom: 16px;
  }
}

@media (max-width: 600px) {
  .pulse-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pulse-section-actions {
    width: 100%;
  }

  .pulse-section-actions button {
    flex: 1;
  }

  .notes-input-actions {
    flex-direction: column;
  }

  .notes-input-left {
    width: 100%;
  }
}

/* ============================================
   TDQ Management View Styles
   ============================================ */

.tdq-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.tdq-view-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tdq-view-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tdq-view-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.tdq-view-item:hover {
  border-color: var(--accent-alt);
  box-shadow: var(--shadow);
}

.tdq-view-item.is-bug {
  border-left: 3px solid var(--accent);
}

.tdq-view-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.tdq-view-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
}

.tdq-view-item-status {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.tdq-view-item-status.pending {
  background: var(--bg-card);
  color: var(--text-muted);
}

.tdq-view-item-status.in-progress {
  background: var(--accent-alt-soft);
  color: var(--accent-alt);
}

.tdq-view-item-status.done {
  background: var(--success-soft);
  color: var(--success);
}

.tdq-view-item-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.tdq-view-item-meta {
  display: flex;
  gap: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

.tdq-view-item-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tdq-view-item-meta-label {
  color: var(--text-muted);
}

.tdq-view-item-meta-value {
  color: var(--text-main);
  font-weight: 500;
}

.tdq-view-item-meta-value.due-date {
  color: var(--accent);
  font-weight: 600;
}

.tdq-view-item .bug-icon {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 18px;
  color: var(--accent);
}

/* TDQ Drawer Status Dropdown */
.tdq-status-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
}

.tdq-status-select:focus {
  outline: none;
  border-color: var(--accent-alt);
}

/* ============================================
   TPS Report Styles
   ============================================ */

.tps-report-btn {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
}

.tps-report-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-alt);
  color: var(--accent-alt);
}

/* Light mode: make TPS button more prominent */
[data-theme="light"] .tps-report-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #2563eb;
  color: #ffffff;
}

[data-theme="light"] .tps-report-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
  color: #ffffff;
}

/* Dark mode: subtle blue accent for TPS button */
[data-theme="dark"] .tps-report-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-alt);
}

[data-theme="dark"] .tps-report-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.2) 100%);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.tps-report-modal .modal-content {
  max-width: 700px;
}

.tps-report-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.tps-period-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tps-period-selector label {
  font-size: 13px;
  color: var(--text-muted);
}

.tps-period-selector select {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
}

.tps-report-content {
  padding: 0 8px;
}

.tps-report-header {
  text-align: center;
  margin-bottom: 32px;
}

.tps-team-name {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.tps-report-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.tps-report-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.tps-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.tps-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.tps-metric-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-alt);
  margin-bottom: 4px;
}

.tps-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tps-section {
  margin-bottom: 24px;
}

.tps-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.tps-outcomes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tps-outcome-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 13px;
}

.tps-outcome-name {
  color: var(--text-main);
}

.tps-outcome-decision {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.tps-outcome-decision.scale {
  background: var(--success-soft);
  color: var(--success);
}

.tps-outcome-decision.adjust {
  background: var(--accent-alt-soft);
  color: var(--accent-alt);
}

.tps-outcome-decision.stop {
  background: var(--accent-soft);
  color: var(--accent);
}

.tps-outcome-decision.hold {
  background: var(--warning-soft);
  color: var(--warning);
}

.tps-reflections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tps-reflection-item {
  padding: 12px 14px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent-alt);
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}

.tps-empty-state {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

/* Print styles for TPS Report */
@media print {
  .tps-report-modal .modal-backdrop {
    display: none;
  }

  .tps-report-modal .modal-content {
    box-shadow: none;
    border: none;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 20px;
  }

  .tps-report-modal .modal-header,
  .tps-report-modal .form-actions,
  .tps-report-controls {
    display: none;
  }

  .tps-report-content {
    padding: 0;
  }

  .tps-metric-card {
    border: 1px solid #ddd;
  }

  .tps-reflection-item {
    border-left: 3px solid #666;
  }
}
