/* Mission Control v2 — Tab-based layout matching Devices panel visual language */

/* Wrapper: flex child of .main-content so MC fills the column below the title bar */
.mission-control-main {
  min-height: 0;
  overflow: hidden;
}

.mc-v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--color-bg-primary);
  font-family: var(--font-ui);
  animation: dp-fade-in 0.6s ease-out;
}

.mc-v2-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--color-text-secondary);
}

/* ── Top Bar (Devices dp-header / dp-input-box style) ── */
.mc-v2-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 40px 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.mc-v2-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mc-v2-topbar h1 {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  white-space: nowrap;
}

.mc-v2-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.mc-v2-selector-label {
  font-size: 10px;
  color: var(--color-text-muted);
  letter-spacing: 0.4px;
}

.mc-v2-selector select {
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 12px;
  outline: none;
}

.mc-v2-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mc-v2-stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-glass);
  border: 1px solid var(--color-border);
  font-size: 11px;
  color: var(--color-text-secondary);
}

.mc-v2-stat-pill strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.mc-v2-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons — reuse dp-secondary-btn visual language */
.mc-v2-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-bg-glass);
  color: var(--color-text);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
}

.mc-v2-icon-btn:hover:not(:disabled) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.mc-v2-icon-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mc-v2-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
}

/* ── Tab Bar ── */
.mc-v2-tabbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 40px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.mc-v2-tab {
  position: relative;
  padding: 10px 16px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}

.mc-v2-tab:hover {
  color: var(--color-text-primary);
}

.mc-v2-tab.active {
  color: var(--color-text-primary);
  font-weight: 600;
}

.mc-v2-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* ── Main Content Area ── */
.mc-v2-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.mc-v2-tab-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.mc-v2-tab-content::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ── Overview Tab ── */
.mc-v2-overview {
  padding: 24px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-content: start;
  max-width: 1100px;
}

.mc-v2-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  background: linear-gradient(
    135deg,
    var(--color-bg-elevated) 0%,
    color-mix(in srgb, var(--color-bg-elevated) 90%, var(--color-accent-subtle)) 100%
  );
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  cursor: pointer;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

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

.mc-v2-card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

.mc-v2-card-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.mc-v2-card-badge.attention {
  background: color-mix(in srgb, #f59e0b 15%, var(--color-bg-tertiary));
  color: #f59e0b;
}

.mc-v2-card-badge.healthy {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.mc-v2-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
}

.mc-v2-card-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-v2-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.mc-v2-card-item-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-v2-card-item-value {
  font-weight: 600;
  color: var(--color-text-primary);
}

.mc-v2-workspace-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  font-size: 9px;
  font-weight: 600;
  color: var(--color-text-muted);
  vertical-align: middle;
}

.mc-v2-pipeline-bar {
  display: flex;
  gap: 2px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
}

.mc-v2-pipeline-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
  min-width: 24px;
  transition: flex 0.3s;
}

.mc-v2-card-footer {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* ── Agents Tab ── */
.mc-v2-agents {
  padding: 24px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  max-width: 1100px;
}

.mc-v2-agent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mc-v2-agent-card:hover {
  border-color: var(--color-text-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.mc-v2-agent-card.selected {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

.mc-v2-agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.mc-v2-agent-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mc-v2-agent-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-v2-agent-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-v2-autonomy-badge {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  color: white;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.mc-v2-agent-desc {
  font-size: 11px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-v2-agent-task {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-v2-agent-task-workspace {
  font-size: 9px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mc-v2-agent-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.mc-v2-status-dot-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mc-v2-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.mc-v2-status-dot.working { background: var(--color-success); }
.mc-v2-status-dot.idle { background: var(--color-text-muted); }
.mc-v2-status-dot.offline { background: var(--color-border); }

.mc-v2-status-text {
  font-size: 9px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}

.mc-v2-wake-btn {
  padding: 3px 8px;
  border-radius: 6px;
  border: none;
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.mc-v2-wake-btn:hover {
  filter: brightness(0.95);
}

.mc-v2-add-agent-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  background: var(--color-bg-glass);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  min-height: 72px;
}

.mc-v2-add-agent-btn:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

/* ── Board Tab ── */
.mc-v2-board {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mc-v2-board-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 40px 12px;
  border-bottom: 1px solid var(--color-border);
}

.mc-v2-board-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}

.mc-v2-board-header h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--color-text-primary);
  margin: 0;
  text-transform: none;
}

.mc-v2-board-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.mc-v2-board-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mc-v2-board-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.mc-v2-board-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

.mc-v2-board-presets {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  background: var(--color-bg-secondary);
  border-radius: 8px;
  padding: 2px;
}

.mc-v2-board-selects {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.mc-v2-board-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  max-width: 280px;
  flex: 1;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-primary);
  color: var(--color-text-muted);
  transition: border-color 0.15s ease;
}

.mc-v2-board-search:focus-within {
  border-color: var(--color-accent);
}

.mc-v2-board-search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-text-primary);
  width: 100%;
  font-size: 12px;
}

.mc-v2-board-selects select {
  min-width: 110px;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--color-bg-primary);
  color: var(--color-text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.mc-v2-board-selects select:hover {
  border-color: var(--color-border);
}

.mc-v2-kanban {
  display: flex;
  gap: 12px;
  padding: 16px 40px 20px;
  flex: 1;
  overflow: auto;
  align-content: flex-start;
}

.mc-v2-kanban-column {
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-secondary);
  border-radius: 10px;
  padding: 0 0 8px;
}

.mc-v2-kanban-column.drag-over {
  background: color-mix(in srgb, var(--color-accent) 6%, var(--color-bg-secondary));
}

.mc-v2-column-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 8px;
}

.mc-v2-column-header-top {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.mc-v2-column-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mc-v2-column-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0;
  text-transform: capitalize;
}

.mc-v2-column-count {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: 2px;
  padding: 0;
  border-radius: 0;
  background: none;
  font-weight: 400;
}

.mc-v2-column-count.over-limit {
  color: #ef4444;
  background: none;
  font-weight: 600;
}

.mc-v2-column-signals {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  padding-left: 17px;
}

.mc-v2-column-signal {
  font-size: 10px;
  color: var(--color-text-muted);
  padding: 0;
  border-radius: 0;
  background: none;
}

.mc-v2-column-signal.attention {
  color: #f59e0b;
}

.mc-v2-column-signal.overdue {
  color: #ef4444;
}

.mc-v2-column-signal.stale {
  color: var(--color-accent);
}

.mc-v2-column-tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px;
}

/* Column footer with add actions */
.mc-v2-column-footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 8px 2px;
}

.mc-v2-column-footer-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.mc-v2-column-footer-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-secondary);
}

.mc-v2-task-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.mc-v2-task-card:hover {
  background: var(--color-bg-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mc-v2-task-card:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

.mc-v2-task-card.attention {
  border-left: 3px solid #f59e0b;
}

.mc-v2-task-card.selected {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 4%, var(--color-bg-elevated));
}

.mc-v2-task-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

/* Hide badges row when empty to reduce card height */
.mc-v2-task-card-top:empty {
  display: none;
  margin: 0;
}

.mc-v2-task-card-badges,
.mc-v2-task-card-actions,
.mc-v2-label-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mc-v2-task-card-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.mc-v2-task-card:hover .mc-v2-task-card-actions,
.mc-v2-task-card.selected .mc-v2-task-card-actions,
.mc-v2-task-card:focus-within .mc-v2-task-card-actions {
  opacity: 1;
}

@media (hover: none) {
  .mc-v2-task-card-actions {
    opacity: 1;
  }
}

.mc-v2-task-action-btn,
.mc-v2-label-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-primary);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.mc-v2-task-action-btn svg {
  display: block;
  width: 12px;
  height: 12px;
  stroke: currentColor;
  color: inherit;
  flex-shrink: 0;
}

.mc-v2-task-action-btn:hover,
.mc-v2-label-remove:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.mc-v2-priority-pill,
.mc-v2-label-pill,
.mc-v2-inline-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.mc-v2-priority-pill {
  color: white;
}

.mc-v2-label-pill {
  border-color: var(--color-border);
}

.mc-v2-label-pill.muted {
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
}

.mc-v2-label-pill .mc-v2-label-remove {
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
}

.mc-v2-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 6px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mc-v2-task-reason {
  font-size: 11px;
  color: #f59e0b;
  margin-bottom: 6px;
  line-height: 1.3;
}

.mc-v2-task-workspace {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.mc-v2-task-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  margin-top: 4px;
}

.mc-v2-task-assignee-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.mc-v2-task-assignee-avatar svg {
  display: block;
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

.mc-v2-task-assignee-name {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.mc-v2-task-unassigned {
  font-size: 11px;
  color: var(--color-text-muted);
  font-style: italic;
}

.mc-v2-task-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.mc-v2-inline-chip {
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
}

.mc-v2-inline-chip.soon {
  color: #f59e0b;
}

.mc-v2-inline-chip.overdue {
  color: #ef4444;
  background: color-mix(in srgb, #ef4444 12%, var(--color-bg-secondary));
}

.mc-v2-inline-chip.stale {
  color: var(--color-accent);
}

.mc-v2-task-footer-actions {
  margin-top: 10px;
}

.mc-v2-task-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  font-size: 11px;
  cursor: pointer;
}

.mc-v2-task-secondary-btn:hover:not(:disabled) {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.mc-v2-task-secondary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Shared status pill */
.mc-v2-status-pill {
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.mc-v2-status-pill.status-completed { background: var(--color-success-subtle); color: var(--color-success); }
.mc-v2-status-pill.status-executing,
.mc-v2-status-pill.status-planning,
.mc-v2-status-pill.status-interrupted { background: color-mix(in srgb, var(--color-accent) 15%, var(--color-bg-tertiary)); color: var(--color-accent); }
.mc-v2-status-pill.status-queued,
.mc-v2-status-pill.status-pending { background: color-mix(in srgb, var(--color-text-muted) 15%, var(--color-bg-tertiary)); color: var(--color-text-secondary); }
.mc-v2-status-pill.status-paused,
.mc-v2-status-pill.status-blocked { background: color-mix(in srgb, #f59e0b 20%, var(--color-bg-tertiary)); color: #f59e0b; }
.mc-v2-status-pill.status-failed,
.mc-v2-status-pill.status-cancelled { background: color-mix(in srgb, #ef4444 20%, var(--color-bg-tertiary)); color: #ef4444; }

.mc-v2-task-time {
  font-size: 10px;
  color: var(--color-text-muted);
}

.mc-v2-column-empty {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 24px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
}

/* ── Feed Tab ── */
.mc-v2-feed {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mc-v2-feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 40px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.mc-v2-feed-filters {
  display: flex;
  gap: 4px;
}

.mc-v2-filter-btn {
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.mc-v2-filter-btn:hover { background: var(--color-bg-tertiary); color: var(--color-text-secondary); }
.mc-v2-filter-btn.active { background: var(--color-accent); color: white; }

.mc-v2-feed-agent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-v2-agent-chip {
  padding: 3px 8px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-size: 10px;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mc-v2-agent-chip.active {
  background: var(--color-accent-subtle);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.mc-v2-agent-chip:disabled {
  cursor: default;
  opacity: 1;
}

.mc-v2-feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 40px;
}

.mc-v2-feed-item {
  padding: 12px 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
  border-radius: 8px;
  transition: background 0.15s;
  cursor: default;
}

.mc-v2-feed-item:hover { background: var(--color-bg-tertiary); }

.mc-v2-feed-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.mc-v2-feed-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mc-v2-feed-agent {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mc-v2-feed-agent.system { color: var(--color-text-secondary); }

.mc-v2-feed-time {
  font-size: 10px;
  color: var(--color-text-muted);
}

.mc-v2-feed-content {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  max-width: 1180px;
  overflow-wrap: anywhere;
}

.mc-v2-feed-content.markdown-content p,
.mc-v2-feed-content.markdown-content ul,
.mc-v2-feed-content.markdown-content ol,
.mc-v2-feed-content.markdown-content blockquote,
.mc-v2-feed-content.markdown-content pre {
  margin-top: 6px;
  margin-bottom: 0;
}

.mc-v2-feed-content.markdown-content > :first-child {
  margin-top: 0;
}

.mc-v2-feed-content.markdown-content ul,
.mc-v2-feed-content.markdown-content ol {
  padding-left: 18px;
}

.mc-v2-feed-content.markdown-content li {
  margin: 2px 0;
}

.mc-v2-feed-content.markdown-content h1,
.mc-v2-feed-content.markdown-content h2,
.mc-v2-feed-content.markdown-content h3,
.mc-v2-feed-content.markdown-content h4,
.mc-v2-feed-content.markdown-content h5,
.mc-v2-feed-content.markdown-content h6 {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.mc-v2-feed-content.markdown-content code {
  padding: 1px 4px;
  border-radius: 4px;
}

.mc-v2-feed-content.markdown-content pre {
  max-width: 100%;
  padding: 8px;
}

.mc-v2-feed-content.markdown-content a {
  color: var(--color-accent);
  text-decoration: none;
}

.mc-v2-feed-content.markdown-content a:hover {
  text-decoration: underline;
}

/* ── Command Brief / Intelligence ── */
.mc-v2-brief,
.mc-v2-intelligence {
  height: 100%;
  overflow-y: auto;
  padding: 24px 40px 40px;
}

.mc-v2-brief-hero,
.mc-v2-intelligence-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.mc-v2-brief-hero h1,
.mc-v2-intelligence-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 650;
  color: var(--color-text-primary);
}

.mc-v2-brief-hero p {
  max-width: 680px;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.mc-v2-brief-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mc-v2-brief-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.mc-v2-brief-metric {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  text-align: left;
  cursor: pointer;
}

.mc-v2-brief-metric:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-tertiary);
}

.mc-v2-brief-metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  color: var(--color-text-primary);
}

.mc-v2-brief-metric span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.mc-v2-brief-metric small {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.mc-v2-brief-metric.attention strong {
  color: var(--color-danger, #ef4444);
}

.mc-v2-brief-system-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.mc-v2-brief-system-row span {
  padding: 5px 9px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-secondary);
  font-size: 11px;
}

.mc-v2-runtime-card,
.mc-v2-context-empty {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-secondary);
}

.mc-v2-runtime-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 16px;
}

.mc-v2-runtime-card h2,
.mc-v2-runtime-list-group h3 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 13px;
  font-weight: 650;
}

.mc-v2-runtime-card p,
.mc-v2-context-empty span,
.mc-v2-runtime-more {
  margin: 6px 0 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.mc-v2-runtime-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mc-v2-runtime-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.mc-v2-runtime-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  text-align: left;
  font-size: 12px;
}

.mc-v2-runtime-task:not(:disabled) {
  cursor: pointer;
}

.mc-v2-runtime-task:not(:disabled):hover {
  border-color: var(--color-accent);
  background: var(--color-bg-tertiary);
}

.mc-v2-runtime-task span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-v2-runtime-task em {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 11px;
  font-style: normal;
}

.mc-v2-context-empty strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 13px;
}

.mc-v2-brief-grid,
.mc-v2-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mc-v2-brief-section,
.mc-v2-intelligence-section {
  min-width: 0;
}

.mc-v2-brief-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mc-v2-brief-section-header h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 650;
}

.mc-v2-brief-section-header span {
  color: var(--color-text-muted);
  font-size: 11px;
}

.mc-v2-brief-list,
.mc-v2-intelligence-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-v2-brief-item,
.mc-v2-intelligence-row,
.mc-v2-intel-item {
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: var(--color-bg-secondary);
}

.mc-v2-brief-item,
.mc-v2-intelligence-row {
  padding: 12px;
}

.mc-v2-brief-item.attention,
.mc-v2-intelligence-row.attention,
.mc-v2-intel-item.attention {
  border-color: color-mix(in srgb, var(--color-warning, #f59e0b) 45%, var(--color-border));
}

.mc-v2-brief-item.danger,
.mc-v2-intelligence-row.danger,
.mc-v2-intel-item.danger {
  border-color: color-mix(in srgb, var(--color-danger, #ef4444) 45%, var(--color-border));
}

.mc-v2-brief-item.healthy,
.mc-v2-intelligence-row.healthy,
.mc-v2-intel-item.healthy {
  border-color: color-mix(in srgb, var(--color-success, #22c55e) 38%, var(--color-border));
}

.mc-v2-brief-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mc-v2-brief-kicker {
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.mc-v2-brief-item h3,
.mc-v2-intel-body h3,
.mc-v2-intelligence-row h3 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.mc-v2-brief-item p,
.mc-v2-intel-body p,
.mc-v2-intelligence-row p {
  margin: 6px 0 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.mc-v2-brief-disposition {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  font-size: 12px;
}

.mc-v2-brief-disposition strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.mc-v2-feed-filter-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mc-v2-feed-filters.subtle .mc-v2-filter-btn {
  border: 1px solid var(--color-border-light);
}

.mc-v2-intel-body {
  margin-top: 8px;
}

.mc-v2-intel-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.mc-v2-inline-action {
  border: 1px solid var(--color-border);
  background: var(--color-bg-glass);
  color: var(--color-text-secondary);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 11px;
  cursor: pointer;
}

.mc-v2-inline-action:hover {
  color: var(--color-text-primary);
  border-color: var(--color-accent);
}

.mc-v2-evidence-list {
  margin-top: 10px;
  border-top: 1px solid var(--color-border-light);
  padding-top: 8px;
}

.mc-v2-evidence-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.mc-v2-evidence-row:last-child {
  border-bottom: 0;
}

.mc-v2-evidence-row strong {
  color: var(--color-text-primary);
  font-size: 12px;
}

.mc-v2-evidence-row p {
  margin: 3px 0 0;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.mc-v2-evidence-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: var(--color-text-muted);
  font-size: 10px;
  text-transform: capitalize;
}

.mc-v2-intelligence-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  gap: 14px;
}

.mc-v2-intelligence-row-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.mc-v2-intelligence-row-side strong {
  color: var(--color-text-primary);
}

.mc-v2-status-pill.danger {
  background: color-mix(in srgb, var(--color-danger, #ef4444) 12%, transparent);
  color: var(--color-danger, #ef4444);
}

.mc-v2-status-pill.attention {
  background: color-mix(in srgb, var(--color-warning, #f59e0b) 14%, transparent);
  color: var(--color-warning, #f59e0b);
}

.mc-v2-status-pill.healthy {
  background: color-mix(in srgb, var(--color-success, #22c55e) 12%, transparent);
  color: var(--color-success, #22c55e);
}

@media (max-width: 900px) {
  .mc-v2-brief,
  .mc-v2-intelligence {
    padding: 18px 20px 32px;
  }

  .mc-v2-brief-hero,
  .mc-v2-intelligence-header {
    flex-direction: column;
  }

  .mc-v2-brief-metrics,
  .mc-v2-brief-grid,
  .mc-v2-runtime-card,
  .mc-v2-runtime-groups,
  .mc-v2-intelligence-grid,
  .mc-v2-intelligence-row {
    grid-template-columns: 1fr;
  }
}

.mc-v2-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 12px;
}

/* ── Detail Panel (slide-out) ── */
.mc-v2-detail-panel {
  width: 460px;
  min-width: 460px;
  background: var(--color-bg-elevated);
  border-left: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  animation: mc-v2-slide-in 0.2s ease-out;
}

@keyframes mc-v2-slide-in {
  from { transform: translateX(16px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.mc-v2-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.mc-v2-detail-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-v2-detail-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.mc-v2-detail-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-glass);
  color: var(--color-text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mc-v2-detail-close svg {
  display: block;
  width: 14px;
  height: 14px;
  stroke: currentColor;
  color: inherit;
  flex-shrink: 0;
}

.mc-v2-detail-close:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.mc-v2-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Task Detail */
.mc-v2-task-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-v2-task-detail-title h3 {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-primary);
}

.mc-v2-detail-updated {
  font-size: 11px;
  color: var(--color-text-muted);
}

.mc-v2-task-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mc-v2-task-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-accent);
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mc-v2-task-primary-action:hover {
  filter: brightness(0.98);
}

.mc-v2-task-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mc-v2-task-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-primary);
}

.mc-v2-task-summary-item span {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mc-v2-task-summary-item strong {
  font-size: 13px;
  color: var(--color-text-primary);
}

.mc-v2-task-summary-item small {
  font-size: 10px;
}

.mc-v2-summary-status.working { color: var(--color-success); }
.mc-v2-summary-status.idle { color: var(--color-text-secondary); }
.mc-v2-summary-status.offline { color: var(--color-text-muted); }

.mc-v2-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mc-v2-detail-meta-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mc-v2-detail-meta label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-secondary);
}

.mc-v2-detail-meta select,
.mc-v2-detail-meta input {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-size: 12px;
}

.mc-v2-detail-label-manager > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mc-v2-detail-label-controls {
  display: flex;
  gap: 8px;
}

.mc-v2-detail-label-controls select {
  flex: 1;
}

.mc-v2-detail-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-v2-detail-section-brief {
  min-height: 520px;
  padding: 14px 16px;
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  background: var(--color-bg-elevated);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.mc-v2-section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mc-v2-section-hint {
  font-size: 11px;
  color: var(--color-text-muted);
}

.mc-v2-detail-section h4 {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-secondary);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 600;
}

.mc-v2-detail-brief-title {
  display: block;
  padding: 0;
  margin-bottom: 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.mc-v2-detail-brief {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.mc-v2-detail-brief-scroll {
  height: clamp(420px, 58vh, 720px);
  min-height: 420px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  position: relative;
  z-index: 1;
}

.mc-v2-empty-inline {
  font-size: 11px;
  color: var(--color-text-muted);
}

.mc-v2-error {
  color: #ef4444;
  font-size: 12px;
}

.mc-v2-comment-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-v2-comment-box textarea {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-size: 12px;
  resize: vertical;
}

.mc-v2-comment-submit {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-accent);
  background: var(--color-accent);
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.mc-v2-comment-submit:hover:not(:disabled) {
  filter: brightness(0.96);
}

.mc-v2-comment-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Agent Detail */
.mc-v2-agent-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc-v2-agent-detail-header .mc-v2-agent-avatar {
  width: 48px;
  height: 48px;
}

.mc-v2-agent-detail-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.mc-v2-agent-detail-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.mc-v2-agent-detail-tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-v2-agent-detail-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-primary);
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-primary);
}

.mc-v2-agent-detail-task:hover {
  background: var(--color-bg-tertiary);
}

.mc-v2-agent-detail-task-workspace-inline {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  color: var(--color-text-muted);
}

/* ── Ops Tab ── */
.mc-v2-ops {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mc-v2-ops-subtabs {
  display: flex;
  gap: 0;
  padding: 0 40px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.mc-v2-ops-subtab {
  position: relative;
  padding: 8px 14px;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}

.mc-v2-ops-subtab:hover { color: var(--color-text-primary); }

.mc-v2-ops-subtab.active {
  color: var(--color-text-primary);
  font-weight: 600;
}

.mc-v2-ops-subtab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 6px;
  right: 6px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.mc-v2-ops-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 40px;
}

/* Ops Overview (KPIs) */
.mc-v2-ops-kpis {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mc-v2-ops-company-name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.mc-v2-ops-company-desc {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.mc-v2-ops-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mc-v2-ops-stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-elevated);
  min-width: 110px;
}

.mc-v2-ops-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.mc-v2-ops-stat-label {
  font-size: 10px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Ops shared list/row styles */
.mc-v2-ops-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mc-v2-ops-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-elevated);
}

.mc-v2-ops-row-btn {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.mc-v2-ops-row-btn:hover {
  background: var(--color-bg-tertiary);
}

.mc-v2-ops-row-btn.selected {
  border-color: var(--color-accent, var(--color-border));
  background: var(--color-bg-tertiary);
}

.mc-v2-ops-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.mc-v2-ops-row-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.mc-v2-ops-pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.mc-v2-ops-pill.status-active,
.mc-v2-ops-pill.status-in_progress,
.mc-v2-ops-pill.status-running,
.mc-v2-ops-pill.status-todo { color: var(--color-warning); }
.mc-v2-ops-pill.status-completed,
.mc-v2-ops-pill.status-done { color: var(--color-success); }
.mc-v2-ops-pill.status-failed,
.mc-v2-ops-pill.status-cancelled,
.mc-v2-ops-pill.status-blocked { color: var(--color-danger); }

/* Ops Operators */
.mc-v2-ops-operators {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Ops Planner */
.mc-v2-planner-config {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mc-v2-planner-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-v2-planner-status-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mc-v2-planner-status-badge.enabled {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.mc-v2-planner-status-badge.disabled {
  background: var(--color-bg-tertiary);
  color: var(--color-text-muted);
}

.mc-v2-planner-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mc-v2-planner-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
}

.mc-v2-planner-field.checkbox { cursor: pointer; }

.mc-v2-planner-field span {
  font-size: 11px;
  color: var(--color-text-secondary);
}

.mc-v2-planner-field select,
.mc-v2-planner-field input[type="number"] {
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 12px;
  min-width: 88px;
}

.mc-v2-planner-field input[type="checkbox"] { margin: 0; }

.mc-v2-planner-runs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.mc-v2-planner-run {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-elevated);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.mc-v2-planner-run.selected {
  border-color: var(--color-accent, var(--color-border));
  background: var(--color-bg-tertiary);
}

.mc-v2-planner-run-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mc-v2-planner-run-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
}

.mc-v2-planner-run-status.completed { color: var(--color-success); }
.mc-v2-planner-run-status.failed { color: var(--color-danger); }
.mc-v2-planner-run-status.running,
.mc-v2-planner-run-status.queued { color: var(--color-warning); }

.mc-v2-planner-run-summary {
  font-size: 11px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-v2-planner-run-time {
  font-size: 11px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.mc-v2-planner-run-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-elevated);
}

.mc-v2-planner-run-metrics {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* Ops Execution Map */
.mc-v2-ops-execution-map {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Ops split layout for issue detail */
.mc-v2-ops-split {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.mc-v2-ops-subsection {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
  flex: 1;
}

.mc-v2-ops-subsection h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Issue Detail in ops */
.mc-v2-issue-detail-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
}

/* ── Editor Modal ── */
.mc-v2-editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.mc-v2-editor-modal {
  background: var(--color-bg-elevated);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90%;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}

.mc-v2-standup-modal {
  max-width: 900px;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .mc-v2-overview { grid-template-columns: repeat(2, 1fr); }
  .mc-v2-detail-panel { width: 400px; min-width: 400px; }
}

@media (max-width: 900px) {
  .mc-v2-overview { grid-template-columns: 1fr; padding: 24px 28px; }
  .mc-v2-agents { grid-template-columns: 1fr; padding: 24px 28px; }
  .mc-v2-topbar { flex-wrap: wrap; padding: 16px 28px 14px; }
  .mc-v2-tabbar { padding: 0 28px; }
  .mc-v2-kanban-column { flex: 1 1 100%; max-width: none; }
  .mc-v2-kanban { padding: 20px 28px; }
  .mc-v2-feed-toolbar { padding: 12px 28px; }
  .mc-v2-feed-list { padding: 12px 28px; }
  .mc-v2-ops-subtabs { padding: 0 28px; }
  .mc-v2-ops-content { padding: 24px 28px; }
  .mc-v2-board-header-main,
  .mc-v2-board-toolbar { flex-direction: column; }
  .mc-v2-detail-meta-wide,
  .mc-v2-task-summary-grid { grid-template-columns: 1fr; }
}
