/* ══════════════════════════════════════════════════
   WIZARD — shell
══════════════════════════════════════════════════ */
.wizard-page {
  padding-top: 60px;
}

.wizard-page .navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.wizard-page .progress-strip {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
}

.wizard-shell {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  padding-top: 56px;
}

/* ══════════════════════════════════════════════════
   TOP PROGRESS STRIP
══════════════════════════════════════════════════ */
.progress-strip {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 20px;
  z-index: 30;
  box-shadow: 0 1px 0 var(--border-subtle), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.back-to-catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.back-to-catalog-btn:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
  border-color: var(--bg-muted);
}

.progress-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.progress-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.progress-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--bg-muted);
  border-radius: 10px;
  overflow: hidden;
  min-width: 80px;
}

.progress-bar-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  border-radius: 10px;
  transition: width 0.4s ease;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 8px rgba(124, 58, 237, 0.6);
}

.progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.progress-close {
  margin-left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.progress-close:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
  border-color: var(--bg-muted);
}

/* ══════════════════════════════════════════════════
   WIZARD BODY
══════════════════════════════════════════════════ */
.wizard-body {
  flex: 1;
  display: flex;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 40px 140px;
  gap: 36px;
  align-items: flex-start;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-overlay);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.checkbox-pill:hover {
  border-color: var(--bg-muted);
  color: var(--text-primary);
}

.checkbox-pill input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.checkbox-pill:has(input:checked) {
  border-color: rgba(13, 148, 136, 0.35);
  background: rgba(13, 148, 136, 0.12);
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════
   STEP SIDEBAR
══════════════════════════════════════════════════ */
.step-sidebar {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 136px;
}

.step-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.step-sidebar-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-sidebar-logo-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.step-sidebar-brand {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.step-sidebar-brand span {
  color: var(--text-muted);
  font-weight: 400;
}

.step-sidebar-body {
  padding: 18px 14px 14px;
}

.step-sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 4px;
  margin-bottom: 14px;
}

/* Step list */
.steps-list {
  display: flex;
  flex-direction: column;
  position: relative;
}

.steps-list::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 32px;
  bottom: 40px;
  width: 1px;
  background: var(--border);
  z-index: 0;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background 0.15s;
  border: 1px solid transparent;
}

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

.step-item.active {
  background: var(--accent-glow);
  border-color: rgba(13, 148, 136, 0.2);
}

.step-item.pending:hover { background: rgba(33, 38, 45, 0.6); }

/* Step indicator circle */
.step-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--step-pending);
  background: var(--bg-overlay);
  color: var(--text-muted);
  transition: all 0.2s;
  position: relative;
  z-index: 2;
}

.step-item.done .step-indicator {
  background: var(--step-done);
  border-color: var(--step-done);
  color: var(--bg-canvas);
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.15);
}

.step-item.active .step-indicator {
  background: var(--bg-surface);
  border-color: var(--step-active);
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
  font-weight: 700;
}

.step-item.pending .step-indicator {
  background: var(--bg-overlay);
  border-color: var(--step-pending);
  color: var(--text-muted);
}

/* Step text content */
.step-content {
  flex: 1;
  min-width: 0;
  padding-top: 3px;
}

.step-number {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1px;
  letter-spacing: 0.2px;
}

.step-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-item.done .step-name   { color: var(--text-primary); }
.step-item.active .step-name  { color: var(--accent-bright); font-weight: 600; }
.step-item.pending .step-name { color: var(--text-muted); }

.step-status-text {
  font-size: 11px;
  margin-top: 2px;
}

.step-item.done .step-status-text   { color: var(--step-done); }
.step-item.active .step-status-text  { color: var(--accent); }
.step-item.pending .step-status-text { color: var(--text-muted); }

/* Sidebar footer help card */
.sidebar-help {
  margin-top: 4px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
}

.sidebar-help-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-help-title svg { opacity: 0.7; flex-shrink: 0; }

.sidebar-help-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.sidebar-help-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.sidebar-help-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════
   MAIN STEP PANEL
══════════════════════════════════════════════════ */
.step-panel {
  flex: 1;
  min-width: 0;
}

.step-panel-header {
  margin-bottom: 28px;
}

.step-panel-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.step-panel-eyebrow-line {
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  flex-shrink: 0;
}

.step-panel-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.step-panel-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 580px;
}

/* ── Protocol cards ── */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.protocol-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 20px 18px 18px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

.protocol-card:hover {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(13, 148, 136, 0.15);
}

.protocol-card.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow:
    0 0 0 1px var(--accent),
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(13, 148, 136, 0.12);
}

.protocol-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.protocol-card.selected .protocol-card-check {
  opacity: 1;
  transform: scale(1);
}

.protocol-card-check svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
  stroke-width: 2.5;
  fill: none;
}

.protocol-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
  transition: all 0.18s;
}

.protocol-card.rest .protocol-icon-wrap {
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.2);
}

.protocol-card.graphql .protocol-icon-wrap {
  background: rgba(188, 140, 255, 0.12);
  border: 1px solid rgba(188, 140, 255, 0.2);
}

.protocol-card.grpc .protocol-icon-wrap {
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.protocol-card.selected.rest .protocol-icon-wrap {
  background: rgba(88, 166, 255, 0.18);
  border-color: rgba(88, 166, 255, 0.35);
}

.protocol-card.selected.graphql .protocol-icon-wrap {
  background: rgba(188, 140, 255, 0.18);
  border-color: rgba(188, 140, 255, 0.35);
}

.protocol-card.selected.grpc .protocol-icon-wrap {
  background: rgba(13, 148, 136, 0.2);
  border-color: rgba(13, 148, 136, 0.4);
}

.protocol-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.protocol-card.selected .protocol-card-name { color: #fff; }

.protocol-card-tagline {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.protocol-card.selected .protocol-card-tagline { color: var(--accent-bright); }

.protocol-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.protocol-tag {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-overlay);
  color: var(--text-muted);
  letter-spacing: 0.1px;
  transition: all 0.15s;
}

.protocol-card.selected .protocol-tag {
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.3);
  color: var(--accent-bright);
}

.protocol-card.rest.selected .protocol-tag {
  background: rgba(88, 166, 255, 0.1);
  border-color: rgba(88, 166, 255, 0.25);
  color: #58a6ff;
}

.protocol-card.graphql.selected .protocol-tag {
  background: rgba(188, 140, 255, 0.1);
  border-color: rgba(188, 140, 255, 0.25);
  color: #bc8cff;
}

/* ── REST method picker ── */
.method-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.method-section-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.method-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.method-section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.method-section-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.method-btn {
  padding: 10px 8px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--bg-overlay);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
}

.method-btn:hover { border-color: var(--bg-muted); background: rgba(33, 38, 45, 0.8); }

.method-btn.selected-get    { border-color: #3fb950; background: rgba(63, 185, 80, 0.08); }
.method-btn.selected-post   { border-color: #58a6ff; background: rgba(88, 166, 255, 0.08); }
.method-btn.selected-put    { border-color: #d29922; background: rgba(210, 153, 34, 0.08); }
.method-btn.selected-patch  { border-color: #bc8cff; background: rgba(188, 140, 255, 0.08); }
.method-btn.selected-delete { border-color: #f85149; background: rgba(248, 81, 73, 0.08); }

.method-verb {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.method-btn.selected-get    .method-verb { color: #3fb950; }
.method-btn.selected-post   .method-verb { color: #58a6ff; }
.method-btn.selected-put    .method-verb { color: #d29922; }
.method-btn.selected-patch  .method-verb { color: #bc8cff; }
.method-btn.selected-delete .method-verb { color: #f85149; }

.method-label { font-size: 10px; color: var(--text-muted); }

/* ── Info callout ── */
.info-callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(13, 148, 136, 0.07);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 8px;
}

.info-callout.info-callout-subtle {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.18);
}

.info-callout.is-success {
  background: rgba(13, 148, 136, 0.07);
  border-color: rgba(13, 148, 136, 0.28);
}

.info-callout.is-error {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.28);
}

.info-callout-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
}

.info-callout.info-callout-subtle .info-callout-icon {
  color: var(--text-secondary);
}

.info-callout.is-error .info-callout-icon,
.info-callout.is-error .info-callout-title {
  color: #f87171;
}

.info-callout.is-success .info-callout-title {
  color: var(--accent-bright);
}

.info-callout-body { flex: 1; }

.info-callout-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 4px;
}

.info-callout-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.info-callout-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.info-callout-text a:hover { text-decoration: underline; }

/* ── Config card ── */
.config-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.config-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.config-card-header-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.config-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.config-card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.config-card-optional {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: 10px;
}

.config-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form fields */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-label-required {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(248, 81, 73, 0.12);
  color: var(--red);
  border: 1px solid rgba(248, 81, 73, 0.2);
  letter-spacing: 0.2px;
}

.form-label-optional {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.form-input,
.form-textarea,
.form-select {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.form-select {
  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='%236e7681' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s;
}

.toggle-row:hover { background: rgba(33, 38, 45, 0.8); }

.toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
  cursor: pointer;
}

.toggle.on {
  background: var(--accent);
  border-color: var(--accent-dim);
}

.toggle::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.toggle.on::after { transform: translateX(16px); }

.toggle-text { flex: 1; }
.toggle-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.toggle-desc  { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

/* ══════════════════════════════════════════════════
   BOTTOM ACTION BAR — frosted dark glass
══════════════════════════════════════════════════ */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid rgba(48, 54, 61, 0.7);
  z-index: 50;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.03),
    0 -8px 32px rgba(0, 0, 0, 0.6);
}

.action-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  white-space: nowrap;
}

.btn-back {
  background: var(--bg-overlay);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

.btn-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-back:disabled:hover {
  background: var(--bg-overlay);
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-save-draft {
  background: none;
  color: var(--text-muted);
  border: none;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 9px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-save-draft:hover {
  color: var(--text-secondary);
  background: rgba(33, 38, 45, 0.6);
}

.action-bar-spacer { flex: 1; }

.step-counter {
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.step-counter strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-continue {
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  font-size: 14px;
  border: 1px solid var(--accent-dim);
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.4);
  transition: all 0.15s;
}

.btn-continue:hover {
  background: var(--accent-dim);
  border-color: transparent;
  box-shadow:
    0 2px 10px rgba(13, 148, 136, 0.5),
    0 0 0 3px var(--accent-ring);
  transform: translateY(-1px);
}

.btn-continue:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.3);
}

.btn-continue.is-final-step {
  background: #3fb950;
  border-color: #2ea043;
  box-shadow: 0 1px 4px rgba(63, 185, 80, 0.4);
}

.btn-continue.is-final-step:hover {
  background: #2ea043;
  border-color: transparent;
  box-shadow:
    0 2px 10px rgba(63, 185, 80, 0.45),
    0 0 0 3px rgba(63, 185, 80, 0.18);
}

/* ── Code editor ── */
.code-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #1e2330;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-dots { display: flex; gap: 5px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

.code-toolbar-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b949e;
}

.code-textarea {
  background: #161b22 !important;
  color: #c9d1d9 !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace !important;
  font-size: 12.5px !important;
  line-height: 1.65 !important;
  border: none !important;
  border-radius: 0 !important;
  resize: vertical;
  min-height: 160px;
}

.code-textarea:focus {
  border-color: transparent !important;
  box-shadow: none !important;
}

/* ── Section divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.section-divider-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Step pane ── */
.step-pane { display: flex; flex-direction: column; }

/* ── Monospace input variant ── */
.input-mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  letter-spacing: -0.2px;
}

/* ── Step-state colours (wizard-specific) ── */
:root {
  --step-done:    var(--green);
  --step-active:  var(--accent);
  --step-pending: var(--bg-muted);
}

/* ══════════════════════════════════════════════
   Upstream selector (Step 3)
   ══════════════════════════════════════════════ */

/* ── Combobox trigger ── */
.upstream-combobox {
  position: relative;
}

.upstream-combobox-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.upstream-combobox-trigger:hover { border-color: var(--accent); }

.upstream-combobox.open .upstream-combobox-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.upstream-combobox-value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.upstream-combobox-placeholder {
  font-size: 13.5px;
  color: var(--text-muted);
}

.upstream-combobox-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.upstream-combobox.open .upstream-combobox-chevron { transform: rotate(180deg); }

/* Value when upstream is selected (shown inside trigger) */
.upstream-trigger-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: -0.2px;
}

.upstream-trigger-url {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Dropdown panel ── */
.upstream-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-surface);
  border: 1px solid var(--accent);
  border-top: none;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  overflow: hidden;
}

/* Search row */
.upstream-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.upstream-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-primary);
}
.upstream-search-input::placeholder { color: var(--text-muted); }

/* List of upstream items */
.upstream-dropdown-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.upstream-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.12s;
}
.upstream-dropdown-item:hover { background: rgba(13, 148, 136, 0.07); }
.upstream-dropdown-item.selected { background: rgba(13, 148, 136, 0.1); }

.upstream-dropdown-item-info { flex: 1; min-width: 0; }

.upstream-dropdown-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: -0.2px;
}

.upstream-dropdown-item-url {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upstream-dropdown-item-check {
  opacity: 0;
  flex-shrink: 0;
}
.upstream-dropdown-item.selected .upstream-dropdown-item-check { opacity: 1; }

/* Empty state */
.upstream-dropdown-empty {
  padding: 16px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}

/* Footer: Register new */
/* ── Register new upstream trigger row ── */
.upstream-new-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.upstream-new-trigger:hover {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.04);
}
.upstream-new-trigger.active {
  border-style: solid;
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.06);
}

.upstream-new-trigger-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.upstream-new-trigger.active .upstream-new-trigger-radio {
  border-color: var(--accent);
}
.upstream-new-trigger-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s, transform 0.15s;
}
.upstream-new-trigger.active .upstream-new-trigger-dot {
  opacity: 1;
  transform: scale(1);
}

/* ── Auth badges ── */
.upstream-auth-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.upstream-auth-badge.auth-bearer {
  background: rgba(88, 166, 255, 0.1);
  color: #58a6ff;
  border: 1px solid rgba(88, 166, 255, 0.2);
}
.upstream-auth-badge.auth-basic {
  background: rgba(240, 173, 78, 0.12);
  color: #f0ad4e;
  border: 1px solid rgba(240, 173, 78, 0.2);
}
.upstream-auth-badge.auth-apikey {
  background: rgba(188, 140, 255, 0.1);
  color: #bc8cff;
  border: 1px solid rgba(188, 140, 255, 0.2);
}
.upstream-auth-badge.auth-none {
  background: rgba(139, 148, 158, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* ── Selected upstream preview (under combobox) ── */
.upstream-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: 7px;
}

.upstream-preview-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: -0.2px;
}

.upstream-preview-url {
  font-size: 11.5px;
  color: var(--accent-bright, var(--accent));
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  letter-spacing: -0.2px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upstream-preview-change {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.upstream-preview-change:hover { border-color: var(--text-secondary); color: var(--text-primary); }

/* ── Register new upstream inline form ── */
.upstream-new-form {
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.upstream-new-form-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Small action buttons ── */
.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: opacity 0.15s;
}
.btn-primary-sm:hover { opacity: 0.88; }

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost-sm:hover { border-color: var(--text-secondary); color: var(--text-primary); }

.btn-primary-sm:disabled,
.btn-ghost-sm:disabled,
.btn-primary-sm.is-busy,
.btn-ghost-sm.is-busy {
  opacity: 0.68;
  cursor: wait;
}

/* ══════════════════════════════════════════════
   HTTP method picker (Step 4 REST)
   ══════════════════════════════════════════════ */

.method-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--bg-canvas);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font-family: 'Inter', sans-serif;
}

.method-card:hover {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.04);
}

.method-card.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.method-name {
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.method-card.active .method-name { color: #fff; }

.method-desc {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.method-card.active .method-desc { color: var(--accent-bright, var(--accent)); }

.method-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(13, 148, 136, 0.07);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════
   GraphQL operation type cards (Step 4 GraphQL)
   ══════════════════════════════════════════════ */

.gql-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gql-type-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px 18px;
  background: var(--bg-canvas);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: left;
  font-family: 'Inter', sans-serif;
}

.gql-type-card:hover {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.04);
}

.gql-type-card.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.gql-type-keyword {
  font-size: 15px;
  font-weight: 700;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.gql-type-card.active .gql-type-keyword { color: #5eead4; }

.gql-type-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.gql-type-card.active .gql-type-desc { color: var(--text-secondary); }


/* ══════════════════════════════════════════════
   Protocol card — disabled tag (Streaming)
══════════════════════════════════════════════ */
.protocol-tag-disabled {
  text-decoration: line-through;
  color: var(--error, #f87171);
  opacity: 0.75;
}


/* ══════════════════════════════════════════════
   gRPC — Proto upload
══════════════════════════════════════════════ */
.proto-dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg-canvas);
}
.proto-dropzone:hover,
.proto-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(56,139,253,0.05);
}
.proto-dropzone.drag-over { border-style: solid; }

.proto-dropzone-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.proto-dropzone-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.proto-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(56,139,253,0.07);
  border: 1px solid rgba(56,139,253,0.25);
  border-radius: 8px;
}
.proto-file-name {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  color: var(--accent);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proto-file-size {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.proto-file-change {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.proto-file-change:hover { border-color: var(--accent); color: var(--accent); }


/* ══════════════════════════════════════════════
   gRPC — Service/method list
══════════════════════════════════════════════ */
.proto-service-group {
  padding-top: 16px;
}
.proto-service-group + .proto-service-group {
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
}

.proto-service-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.proto-service-label svg { opacity: 0.5; }

.proto-method-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proto-method-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-canvas);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  min-width: 160px;
}
.proto-method-card:hover {
  border-color: var(--border-muted, var(--accent));
  background: rgba(56,139,253,0.04);
}
.proto-method-card.active {
  border-color: var(--accent);
  background: rgba(56,139,253,0.08);
}

.proto-method-name {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.proto-method-card.active .proto-method-name { color: var(--accent); }

.proto-method-types {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.proto-method-types svg { opacity: 0.5; flex-shrink: 0; }

.proto-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}


/* ══════════════════════════════════════════════
   gRPC — Method signature detail
══════════════════════════════════════════════ */
.proto-path-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}
.proto-path-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}
.proto-path-value {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
}

.proto-sig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 680px) {
  .proto-sig-grid { grid-template-columns: 1fr; }
}

.proto-sig-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

.proto-sig-col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.proto-sig-col-header svg { opacity: 0.6; }

.proto-type-badge {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  background: rgba(56,139,253,0.12);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.proto-field-list {
  padding: 6px 0;
}

.proto-field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 5px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.proto-field-row:last-child { border-bottom: none; }

.proto-field-name {
  font-family: var(--font-mono, monospace);
  color: var(--text-primary);
  font-size: 12px;
}
.proto-field-type {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-muted);
}

.proto-field-empty {
  padding: 16px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}


/* ══════════════════════════════════════════════
   gRPC — Source tabs
══════════════════════════════════════════════ */
.grpc-source-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
}

.grpc-source-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  background: none;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.grpc-source-btn svg { flex-shrink: 0; opacity: 0.7; }
.grpc-source-btn:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
.grpc-source-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.grpc-source-btn.active svg { opacity: 1; }


/* ══════════════════════════════════════════════
   gRPC — Reflection panel
══════════════════════════════════════════════ */
.grpc-reflect-upstream {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}
.grpc-reflect-upstream-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.grpc-reflect-upstream-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.grpc-reflect-upstream-url {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-muted);
}

.grpc-reflect-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.grpc-reflect-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: grpc-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes grpc-spin { to { transform: rotate(360deg); } }

.grpc-reflect-error-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--error, #f87171);
}
