
/* ═══════════════════════════════════════════════════════════════
   v2 Code Lifecycle styles
   ═══════════════════════════════════════════════════════════════ */
.v2-code-lifecycle {
    font-family: inherit;
}

.v2-top-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    flex-wrap: wrap;
    font-size: 14px;
}

.v2-repo-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
}

.v2-repo-dot.online {
    background: #22c55e;
}

.v2-badge {
    background: #0ea5e9;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.v2-link {
    color: #0ea5e9;
    text-decoration: none;
    font-size: 13px;
}

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

.v2-repo-input {
    border: 1px solid var(--border, #334155);
    background: transparent;
    color: inherit;
    padding: 2px 6px;
    border-radius: 4px;
    width: 180px;
}

.v2-settings-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--muted, #94a3b8);
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.v2-settings-row label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.v2-settings-row input[type="checkbox"] {
    accent-color: #22c55e;
}

.v2-pull-state {
    background: var(--bg, #fff);
    color: inherit;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 13px;
}

.v2-main-content {
    display: flex;
    gap: 0;
    min-height: 260px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.v2-pipeline-sidebar {
    width: 240px;
    min-width: 240px;
    padding: 12px 16px;
    border-right: 1px solid var(--border, #e2e8f0);
    font-size: 13px;
    line-height: 1.8;
}

.v2-sidebar-title {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted, #94a3b8);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.v2-step {
    padding: 1px 0;
}

.v2-step.sub {
    padding-left: 14px;
}

.v2-step.active {
    color: #0ea5e9;
    font-weight: 600;
}

.v2-branch-label {
    margin-top: 6px;
    font-size: 13px;
}

.v2-sidebar-stats {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
    color: var(--muted, #94a3b8);
    font-weight: 600;
}

.v2-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.v2-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.v2-tab {
    padding: 8px 16px;
    font-size: 13px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted, #94a3b8);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.v2-tab.active {
    color: var(--fg, #1e293b);
    border-bottom-color: #0ea5e9;
    font-weight: 600;
}

.v2-tab-badge {
    background: var(--border, #e2e8f0);
    color: var(--fg, #64748b);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}

.v2-tab-content {
    flex: 1;
    overflow: auto;
}

.v2-pr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.v2-pr-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--muted, #94a3b8);
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.v2-pr-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, #f1f5f9);
}

.v2-pr-table .note {
    text-align: center;
    color: var(--muted, #94a3b8);
    padding: 24px;
}

.v2-state-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.v2-state-badge.pass {
    background: #dcfce7;
    color: #166534;
}

.v2-state-badge.fail {
    background: #fee2e2;
    color: #991b1b;
}

.v2-pr-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 180px;
}

.v2-pr-dropdown a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    color: var(--fg, #1e293b);
    text-decoration: none;
}

.v2-pr-dropdown a:hover {
    background: var(--hover, #f1f5f9);
}

.v2-pr-dropdown hr {
    margin: 2px 0;
    border: 0;
    border-top: 1px solid var(--border, #e2e8f0);
}

.v2-ai-section {
    border-top: 1px solid var(--border, #e2e8f0);
}

.v2-ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 14px;
}

.v2-ai-live {
    color: #22c55e;
    font-size: 13px;
}

.v2-ai-terminal {
    background: var(--terminal-bg, #0f172a);
    color: #94a3b8;
    padding: 10px 14px;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 12px;
    line-height: 1.6;
    min-height: 100px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
}
/* ── UX Architect: 3-way Mode Switch ─────────────────────── */
.preview-mode-switch {
  display: flex;
  gap: 2px;
  background: var(--an-surface-1, #1a1a2e);
  border-radius: 6px;
  padding: 2px;
}
.preview-mode-btn {
  padding: 3px 10px;
  border: none;
  background: transparent;
  color: var(--an-text-dim, #888);
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.preview-mode-btn.active {
  background: var(--an-accent, #7c3aed);
  color: #fff;
  font-weight: 600;
}
.preview-mode-btn:hover:not(.active) {
  background: var(--an-surface-2, #252540);
  color: var(--an-text, #ccc);
}

/* ── UX Architect Controls ─────────────────────────────────── */
.ux-architect-controls {
  padding: 8px 12px;
  background: var(--an-surface-1, #1a1a2e);
  border: 1px solid var(--an-border, #333);
  border-radius: 6px;
  margin-bottom: 8px;
}
.ux-architect-controls .hrow {
  display: flex;
  flex-wrap: wrap;
}
.ux-architect-controls select,
.ux-architect-controls input[type="checkbox"] {
  margin-top: 2px;
}
.ux-architect-controls label {
  font-size: 11px;
  color: var(--an-text-dim, #888);
}

/* ── Swarm Panel: Agent Metrics ──────────────────────────── */
.swarm-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  padding: 8px 10px;
  background: var(--an-surface-0, #0f0f1a);
  border-bottom: 1px solid var(--an-border, #2a2a4a);
}
.swarm-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.swarm-metric-label {
  font-size: 10px;
  color: var(--an-text-dim, #666);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.swarm-metric-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--an-text, #e2e8f0);
  font-family: var(--font-mono, monospace);
}

/* ── Swarm Agent List ──────────────────────────────────────── */
.swarm-agent-list {
  max-height: 140px;
  overflow-y: auto;
  border-bottom: 1px solid var(--an-border, #2a2a4a);
}
.swarm-list-empty {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--an-text-dim, #555);
  font-style: italic;
}
.swarm-agent-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--an-border-dim, #1e1e3a);
  font-size: 11px;
}
.swarm-agent-card:hover {
  background: var(--an-surface-1, #1a1a2e);
}
.swarm-agent-hex {
  font-family: var(--font-mono, monospace);
  color: var(--an-cyan, #06b6d4);
  font-weight: 600;
  font-size: 11px;
  min-width: 90px;
}
.swarm-agent-op {
  flex: 1;
  color: var(--an-text-dim, #888);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swarm-agent-time {
  color: var(--an-text-dim, #666);
  font-family: var(--font-mono, monospace);
  font-size: 10px;
}
.swarm-panel-divider {
  height: 1px;
  background: var(--an-border, #2a2a4a);
}
