#project-selector {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: safe center;
  justify-content: center;
  background: var(--bg-base);
  overflow-y: auto;
}

#project-selector::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, var(--accent-dim) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 85% 100%, var(--info-dim) 0%, transparent 70%);
}

.ws-selector-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  padding: 40px 24px;
}

.ws-selector-header {
  text-align: center;
  margin-bottom: 36px;
}

.ws-selector-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.ws-selector-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.ws-section {
  margin-bottom: 28px;
}

.ws-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.ws-project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: border-color var(--transition);
}

.ws-project-card:hover {
  border-color: color-mix(in srgb, var(--border-active) 40%, var(--border));
}

.ws-project-card-info {
  flex: 1;
  min-width: 0;
}

.ws-project-card-name {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.ws-project-card-path {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-project-card-actions {
  display: flex;
  gap: 6px;
  margin-left: 12px;
  flex-shrink: 0;
}

.ws-register-form,
.ws-create-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: border-color var(--transition);
}

.ws-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.ws-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.ws-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.ws-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.ws-select option {
  background: var(--bg-raised);
  color: var(--text-primary);
}

.ws-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ws-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.ws-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
}

.ws-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-bottom: 16px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.ws-back-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.ws-back-arrow {
  font-size: 1rem;
  line-height: 1;
}

.ws-workspace-card {
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.ws-workspace-card:hover {
  border-color: var(--border-active);
}

.ws-workspace-card--archived {
  opacity: 0.55;
  cursor: default;
}

.ws-workspace-card--archived:hover {
  border-color: var(--border);
}

.ws-workspace-card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.ws-workspace-card-meta {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.command-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.command-block code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-block .btn {
  flex-shrink: 0;
}

.ws-sessions-toggle {
  margin-top: 6px;
}

.ws-sessions-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
}

.ws-sessions-link:hover {
  color: var(--accent);
}

.ws-sessions-dropdown {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ws-session-history-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.ws-session-history-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ws-session-history-item:first-child {
  padding-top: 0;
}

.ws-session-history-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ws-create-result-card {
  margin-top: 12px;
  padding: 16px;
  background: var(--success-dim);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  border-radius: var(--radius);
}

.ws-result-row {
  margin-bottom: 8px;
}

.ws-result-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ws-result-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  word-break: break-all;
}

/* ═══════════════════════════════════════════════ */
/*  REVIEW PIPELINE CARD                           */
/* ═══════════════════════════════════════════════ */

.rp-loading,
.rp-empty,
.rp-fetch-error {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 0;
}

.rp-fetch-error {
  color: var(--danger);
}

.rp-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rp-state-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rp-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rp-badge--queued {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.rp-badge--filtering {
  background: var(--info-dim);
  color: var(--info);
}

.rp-badge--file-stage {
  background: var(--warning-dim);
  color: var(--warning);
}

.rp-badge--integration-stage {
  background: var(--accent-dim);
  color: var(--accent);
}

.rp-badge--done {
  background: var(--success-dim);
  color: var(--success);
}

.rp-badge--failed {
  background: var(--danger-dim);
  color: var(--danger);
}

.rp-elapsed {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rp-pipeline-error {
  font-size: 0.78rem;
  color: var(--danger);
  padding: 6px 10px;
  background: var(--danger-dim);
  border-radius: var(--radius-sm);
}

.rp-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rp-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.rp-progress-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.rp-files-list,
.rp-integration-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rp-file-row,
.rp-integration-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.rp-file-row:last-child,
.rp-integration-row:last-child {
  border-bottom: none;
}

.rp-status-icon {
  flex-shrink: 0;
  font-size: 0.78rem;
  width: 14px;
  text-align: center;
}

.rp-status-icon--done    { color: var(--success); }
.rp-status-icon--failed  { color: var(--danger); }
.rp-status-icon--running { color: var(--info); }
.rp-status-icon--pending { color: var(--text-muted); }

.rp-file-path {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-findings-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rp-file-error {
  font-size: 0.72rem;
  color: var(--danger);
  margin-top: 2px;
}

.rp-reviewer-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.rp-reviewer-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
