/* McpPage — page-specific styles */

/* ── Page header ────────────────────────────────────────── */
.mcp-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--kr-sp-9);
}

/* ── Incomplete-config warning banner ───────────────────── */
.mcp-warning-banner {
  background: rgba(var(--kr-warning-rgb, 251, 191, 36), 0.08);
  border: 1px solid rgba(var(--kr-warning-rgb, 251, 191, 36), 0.35);
  border-radius: var(--kr-r-md);
  padding: var(--kr-sp-4) var(--kr-sp-5);
  margin-bottom: var(--kr-sp-7);
}
.mcp-warning-banner-title {
  font-size: var(--kr-fs-sm);
  font-weight: 700;
  color: var(--kr-warning, #fbbf24);
  margin-bottom: var(--kr-sp-2);
}
.mcp-warning-banner-hint {
  font-size: var(--kr-fs-xs);
  color: var(--kr-text-secondary);
  margin: 0 0 var(--kr-sp-3) 0;
}
.mcp-warning-banner-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--kr-sp-1);
}
.mcp-warning-banner-item {
  background: transparent;
  border: 1px dashed rgba(var(--kr-warning-rgb, 251, 191, 36), 0.25);
  border-radius: var(--kr-r-sm);
  padding: var(--kr-sp-2) var(--kr-sp-3);
  text-align: left;
  font-size: var(--kr-fs-xs);
  color: var(--kr-text-primary);
  cursor: pointer;
  width: 100%;
  transition: background 0.12s, border-color 0.12s;
}
.mcp-warning-banner-item:hover {
  background: rgba(var(--kr-warning-rgb, 251, 191, 36), 0.12);
  border-color: rgba(var(--kr-warning-rgb, 251, 191, 36), 0.55);
}
.mcp-warning-banner-server {
  color: var(--kr-text-tertiary);
}
.mcp-warning-banner-reason {
  color: var(--kr-text-secondary);
}
.mcp-warning-banner-keys {
  margin-left: var(--kr-sp-2);
  font-family: var(--kr-font-mono);
  font-size: var(--kr-fs-2xs);
  background: rgba(var(--kr-warning-rgb, 251, 191, 36), 0.18);
  padding: 1px var(--kr-sp-2);
  border-radius: var(--kr-r-sm);
}

.mcp-h1 {
  font-size: var(--kr-fs-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mcp-subtitle {
  font-size: var(--kr-fs-sm);
  font-weight: 400;
  color: var(--kr-text-muted);
  letter-spacing: 0;
}

.mcp-meta {
  color: var(--kr-text-muted);
  font-size: var(--kr-fs-base);
  margin-top: var(--kr-sp-2);
}

/* ── Scan / action buttons ──────────────────────────────── */
.mcp-btn-action {
  padding: 7px var(--kr-sp-7);
  border-radius: var(--kr-r-md);
  border: 1px solid var(--kr-accent-border);
  background: var(--kr-accent-bg);
  color: var(--kr-accent);
  cursor: pointer;
  font-size: var(--kr-fs-base);
  font-family: inherit;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--kr-sp-3);
}

.mcp-btn-action-primary {
  background: var(--kr-accent-bg-strong);
  color: var(--kr-accent);
}

/* ── Icon button ────────────────────────────────────────── */
.mcp-icon-btn {
  background: none;
  border: 1px solid var(--kr-border);
  border-radius: var(--kr-r-sm);
  padding: var(--kr-sp-2) var(--kr-sp-4);
  color: var(--kr-text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: var(--kr-fs-sm);
}

/* ── Card ───────────────────────────────────────────────── */
.mcp-card {
  background: var(--kr-bg-surface);
  border: 1px solid var(--kr-border);
  border-radius: var(--kr-r-xl);
  padding: var(--kr-sp-8) var(--kr-sp-9);
}

/* ── Add MCP panel ──────────────────────────────────────── */
.mcp-add-panel {
  margin-bottom: var(--kr-sp-9);
  border-color: var(--kr-accent-border);
}

.mcp-add-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--kr-sp-6);
}

.mcp-add-title {
  font-size: var(--kr-fs-lg);
  font-weight: 600;
  color: var(--kr-accent);
  margin: 0;
}

/* ── Category filter pills ──────────────────────────────── */
.mcp-cat-pills {
  display: flex;
  gap: var(--kr-sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--kr-sp-6);
}

.mcp-cat-pill {
  padding: 5px var(--kr-sp-6);
  border-radius: 20px;
  border: 1px solid var(--kr-border-light);
  background: transparent;
  color: var(--kr-text-muted);
  font-size: var(--kr-fs-sm);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--kr-sp-2);
  white-space: nowrap;
  transition: all 0.15s;
}

.mcp-cat-pill:hover {
  border-color: var(--kr-accent-border);
  color: var(--kr-text-secondary);
}

.mcp-cat-pill-active {
  border-color: var(--kr-accent);
  background: rgba(var(--kr-accent-rgb), 0.12);
  color: var(--kr-accent);
}

.mcp-cat-pill-count {
  font-size: var(--kr-fs-2xs);
  opacity: 0.5;
}

/* ── Registry grid ─────────────────────────────────────── */
.mcp-registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--kr-sp-4);
  max-height: 450px;
  overflow-y: auto;
  padding: var(--kr-sp-2);
}

.mcp-registry-card {
  display: flex;
  flex-direction: column;
  gap: var(--kr-sp-3);
  padding: var(--kr-sp-6);
  border-radius: var(--kr-r-lg);
  border: 1px solid var(--kr-border-light);
  background: var(--kr-bg-hover);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.mcp-registry-card:hover {
  border-color: var(--kr-accent-border);
  transform: translateY(-1px);
}

.mcp-registry-card-installed {
  opacity: 0.6;
}

.mcp-registry-card-installed:hover {
  opacity: 1;
}

.mcp-registry-card-custom {
  border-color: var(--kr-accent-border);
  background: linear-gradient(140deg, var(--kr-bg-hover) 0%, var(--kr-bg-accent-soft, var(--kr-bg-hover)) 100%);
  box-shadow: inset 0 0 0 1px var(--kr-accent-border);
}

.mcp-registry-card-custom:hover {
  border-color: var(--kr-accent-ink);
}

.mcp-registry-card-custom .mcp-registry-card-icon {
  color: var(--kr-accent-ink);
}

.mcp-custom-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--kr-sp-3);
  align-items: center;
}

.mcp-registry-card-top {
  display: flex;
  align-items: center;
  gap: var(--kr-sp-4);
}

.mcp-registry-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--kr-r-md);
  background: rgba(var(--kr-accent-rgb), 0.1);
  color: var(--kr-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mcp-registry-card-name {
  font-weight: 600;
  font-size: var(--kr-fs-md);
  line-height: 1.2;
}

.mcp-registry-card-cat {
  font-size: var(--kr-fs-2xs);
  color: var(--kr-text-faint);
  margin-top: 1px;
}

.mcp-registry-card-desc {
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mcp-registry-card-meta {
  display: flex;
  align-items: center;
  gap: var(--kr-sp-2);
  font-size: var(--kr-fs-2xs);
  color: var(--kr-text-faint);
  margin-top: auto;
  flex-wrap: wrap;
}

/* Separator dot between MCP/API kind pills and category pills. */
.mcp-cat-pill-sep {
  color: var(--kr-text-faint);
  margin: 0 2px;
  opacity: 0.5;
}

/* Inline description rendered under an API plugin's config key field.
   Sourced from `api_spec.config_keys.description` — gives the user a
   one-line explanation of what the field is for without cluttering
   the label. */
.mcp-env-key-desc {
  font-size: var(--kr-fs-2xs);
  color: var(--kr-text-tertiary);
  margin-top: 4px;
  /* Align under the input (label width 180px + row gap). */
  margin-left: calc(180px + var(--kr-sp-4));
  line-height: 1.4;
  font-style: italic;
}

/* ── Form fields ────────────────────────────────────────── */
.mcp-field-label {
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-muted);
  display: block;
  margin-bottom: var(--kr-sp-2);
}

.mcp-field-label-inline {
  margin: 0;
}

.mcp-env-key-label {
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-tertiary);
  font-family: var(--kr-font-mono);
  min-width: 180px;
}

.mcp-token-link {
  display: inline-flex;
  align-items: center;
  gap: var(--kr-sp-2);
  font-size: var(--kr-fs-sm);
  color: var(--kr-cyan);
  text-decoration: none;
}

.mcp-token-hint {
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-faint);
}

.mcp-input-mono {
  flex: 1;
  font-family: var(--kr-font-mono);
  font-size: var(--kr-fs-sm);
}
.mcp-env-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.mcp-input-with-eye {
  padding-right: 30px !important;
}
.mcp-eye-btn {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.mcp-eye-btn:hover {
  opacity: 1;
}

/* ── Search bar ─────────────────────────────────────────── */
.mcp-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--kr-sp-3);
  margin-bottom: var(--kr-sp-8);
}

.mcp-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--kr-text-ghost);
  pointer-events: none;
}

.mcp-search-input {
  padding-left: 32px;
  flex: 1;
  min-width: 0;
}

.mcp-search-clear {
  position: absolute;
  /* Sits to the left of the sort toggle button (40px wide + gap). */
  right: calc(40px + var(--kr-sp-4));
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--kr-text-dim);
  padding: 2px;
}

.mcp-sort-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

/* ── Installed plugins grid ─────────────────────────────── */
.mcp-installed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--kr-sp-5);
}

.mcp-installed-card {
  background: var(--kr-bg-surface);
  border: 1px solid var(--kr-border);
  border-radius: var(--kr-r-xl);
  padding: var(--kr-sp-7);
  box-shadow: var(--kr-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--kr-sp-4);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.mcp-installed-card:hover {
  border-color: var(--kr-border-strong);
}

.mcp-installed-top {
  display: flex;
  align-items: flex-start;
  gap: var(--kr-sp-4);
}

.mcp-installed-name {
  font-weight: 600;
  font-size: var(--kr-fs-md);
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mcp-installed-scope {
  display: flex;
  align-items: center;
  gap: var(--kr-sp-3);
  margin-top: 3px;
  flex-wrap: wrap;
}

.mcp-scope-badge {
  font-size: var(--kr-fs-2xs);
  font-weight: 600;
  padding: 1px var(--kr-sp-3);
  border-radius: var(--kr-r-sm);
}

.mcp-scope-global {
  background: rgba(var(--kr-accent-rgb), 0.12);
  color: var(--kr-accent);
}

.mcp-scope-projects {
  background: rgba(var(--kr-info-rgb), 0.12);
  color: var(--kr-info);
}

.mcp-scope-none {
  background: var(--kr-bg-hover);
  color: var(--kr-text-faint);
}

.mcp-installed-keys {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: var(--kr-fs-2xs);
  color: var(--kr-text-faint);
}

.mcp-installed-card-selected {
  border-color: var(--kr-accent);
  background: rgba(var(--kr-accent-rgb), 0.04);
}

/* ── Inline detail panel (spans full grid width) ───────── */
.mcp-detail-inline {
  grid-column: 1 / -1;
  background: var(--kr-bg-surface);
  border: 1px solid var(--kr-accent-border);
  border-radius: var(--kr-r-xl);
  padding: var(--kr-sp-9);
}

.mcp-detail-header {
  display: flex;
  align-items: flex-start;
  gap: var(--kr-sp-6);
  margin-bottom: var(--kr-sp-8);
  padding-bottom: var(--kr-sp-6);
  border-bottom: 1px solid var(--kr-border-light);
}

.mcp-detail-name {
  font-size: var(--kr-fs-xl);
  font-weight: 700;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--kr-sp-3);
}

.mcp-detail-name-input {
  font-size: var(--kr-fs-xl);
  font-weight: 700;
  padding: 2px var(--kr-sp-4);
  width: 300px;
}

.mcp-detail-desc {
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-muted);
  margin: var(--kr-sp-2) 0 0;
  line-height: 1.5;
}

.mcp-detail-body {
  display: flex;
  flex-direction: column;
  gap: var(--kr-sp-8);
}

.mcp-detail-section {
  display: flex;
  flex-direction: column;
  gap: var(--kr-sp-4);
}

.mcp-detail-section-title {
  font-size: var(--kr-fs-sm);
  font-weight: 600;
  color: var(--kr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--kr-sp-3);
}

.mcp-detail-field {
  display: flex;
  flex-direction: column;
  gap: var(--kr-sp-2);
}

.mcp-detail-field-label {
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-tertiary);
  font-family: var(--kr-font-mono);
}

.mcp-server-incompat {
  font-size: var(--kr-fs-xs);
  color: var(--kr-error);
  background: rgba(var(--kr-error-rgb), 0.1);
  padding: 1px var(--kr-sp-3);
  border-radius: var(--kr-r-sm);
  font-weight: 500;
}

/* ── Config card ────────────────────────────────────────── */
.mcp-config-card {
  display: flex;
  align-items: flex-start;
  gap: var(--kr-sp-6);
  padding: var(--kr-sp-7) var(--kr-sp-8);
  border-radius: var(--kr-r-lg);
  background: var(--kr-bg-hover);
  margin-bottom: var(--kr-sp-4);
  border: 1px solid var(--kr-border-light);
}

.mcp-config-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--kr-r-full);
  margin-top: 5px;
  flex-shrink: 0;
}

.mcp-config-dot-global {
  background: var(--kr-accent);
}

.mcp-config-dot-project {
  background: var(--kr-cyan);
}

/* ── Config header: label + badges ──────────────────────── */
.mcp-config-header {
  display: flex;
  align-items: center;
  gap: var(--kr-sp-3);
  flex-wrap: wrap;
}

.mcp-config-label {
  font-weight: 600;
  font-size: var(--kr-fs-md);
  cursor: pointer;
}

.mcp-config-label-input {
  width: 180px;
  font-size: var(--kr-fs-md);
  font-weight: 600;
  padding: 2px var(--kr-sp-3);
}

.mcp-source-badge {
  font-size: var(--kr-fs-xs);
  font-weight: 600;
  padding: 1px var(--kr-sp-3);
  border-radius: var(--kr-r-sm);
  background: rgba(var(--kr-accent-rgb), 0.08);
  color: var(--kr-accent-text);
  border: 1px solid rgba(var(--kr-accent-rgb), 0.12);
}

/* ── Env keys row ───────────────────────────────────────── */
.mcp-env-keys-row {
  display: flex;
  gap: var(--kr-sp-2);
  margin-top: var(--kr-sp-3);
  align-items: center;
  flex-wrap: wrap;
}

.mcp-env-key-name {
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-faint);
  font-family: var(--kr-font-mono);
}

/* ── Secrets editor ─────────────────────────────────────── */
.mcp-secrets-editor {
  margin-top: var(--kr-sp-4);
  padding: var(--kr-sp-6);
  background: var(--kr-bg-subtle);
  border-radius: var(--kr-r-md);
  border: 1px solid rgba(var(--kr-accent-rgb), 0.1);
}

.mcp-secrets-token-link {
  display: inline-flex;
  align-items: center;
  gap: var(--kr-sp-2);
  font-size: var(--kr-fs-sm);
  color: var(--kr-cyan);
  margin-bottom: var(--kr-sp-4);
  text-decoration: none;
}

.mcp-secrets-hint {
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-muted);
  margin: 0 0 var(--kr-sp-4);
}

/* ── Toggle labels (Global / General) ───────────────────── */
.mcp-toggle-row {
  display: flex;
  gap: var(--kr-sp-3);
  margin-top: var(--kr-sp-4);
  align-items: center;
  flex-wrap: wrap;
}

.mcp-toggle-label {
  font-size: var(--kr-fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  padding: var(--kr-sp-2) var(--kr-sp-5);
  border-radius: 5px;
  transition: all 0.15s;
}

.mcp-toggle-global {
  border: 1px solid var(--kr-border);
  background: transparent;
  color: var(--kr-text-ghost);
}

.mcp-toggle-global-active {
  border-color: rgba(var(--kr-accent-rgb), 0.3);
  background: rgba(var(--kr-accent-rgb), 0.12);
  color: var(--kr-accent);
}

.mcp-toggle-general {
  border: 1px solid var(--kr-border);
  background: transparent;
  color: var(--kr-text-ghost);
}

.mcp-toggle-general-active {
  border-color: rgba(var(--kr-info-rgb), 0.3);
  background: rgba(var(--kr-info-rgb), 0.12);
  color: var(--kr-info);
}

.mcp-separator {
  color: var(--kr-text-ghost);
  font-size: var(--kr-fs-sm);
}

/* ── Project toggles ────────────────────────────────────── */
.mcp-project-toggle {
  display: flex;
  align-items: center;
  gap: var(--kr-sp-2);
  padding: var(--kr-sp-2) var(--kr-sp-5);
  border-radius: 5px;
  font-size: var(--kr-fs-sm);
  font-family: inherit;
  cursor: pointer;
}

.mcp-project-toggle-off {
  border: 1px solid var(--kr-border);
  background: var(--kr-bg-subtle);
  color: var(--kr-text-faint);
}

.mcp-project-toggle-on {
  border: 1px solid var(--kr-accent-border);
  background: rgba(var(--kr-accent-rgb), 0.06);
  color: rgba(var(--kr-accent-rgb), 0.8);
}

.mcp-context-btn {
  padding: 3px 5px;
  margin-left: -1px;
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.mcp-more-projects-btn {
  background: none;
  border: 1px solid rgba(var(--kr-accent-rgb), 0.15);
  border-radius: var(--kr-r-sm);
  color: var(--kr-accent);
  font-size: var(--kr-fs-xs);
  padding: 2px var(--kr-sp-4);
  cursor: pointer;
  font-family: inherit;
}

.mcp-less-projects-btn {
  background: none;
  border: 1px solid var(--kr-border-medium);
  border-radius: var(--kr-r-sm);
  color: var(--kr-text-muted);
  font-size: var(--kr-fs-xs);
  padding: 2px var(--kr-sp-4);
  cursor: pointer;
  font-family: inherit;
}

/* ── Empty state ────────────────────────────────────────── */
.mcp-empty {
  text-align: center;
  padding: 40px;
}

.mcp-empty-text {
  color: var(--kr-text-muted);
  font-size: var(--kr-fs-md);
}

/* ── Context editor modal ───────────────────────────────── */
.mcp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--kr-bg-overlay);
  z-index: var(--kr-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mcp-modal {
  background: var(--kr-bg-surface);
  border: 1px solid rgba(var(--kr-accent-rgb), 0.15);
  border-radius: var(--kr-r-2xl);
  padding: var(--kr-sp-10);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: var(--kr-sp-6);
}

.mcp-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.mcp-modal-subtitle {
  margin: var(--kr-sp-2) 0 0;
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-faint);
}

.mcp-modal-textarea {
  min-height: 350px;
  resize: vertical;
  font-family: var(--kr-font-mono);
  font-size: var(--kr-fs-base);
  line-height: 1.6;
  white-space: pre-wrap;
}


/* Origin badges + MCP load indicators: see styles/components.css (shared) */

/* MCP load badge (Plugins page specific — inline in scope toggles) */
.mcp-load-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 500;
}

/* ── 0.8.6 (#29) Autodiscovery banner ────────────────────
 * Shown on Custom plugins with no `api_spec.endpoints[]` to
 * push the user toward the AI helper. Info-colored (less
 * alarming than the warning banner used for incomplete
 * config). Sits inside `.mcp-detail-body` as the first
 * child so it grabs attention before the env section.
 */
.mcp-autodiscovery-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--kr-sp-3);
  background: rgba(var(--kr-info-rgb, 96, 165, 250), 0.07);
  border: 1px solid rgba(var(--kr-info-rgb, 96, 165, 250), 0.30);
  border-radius: var(--kr-r-md);
  padding: var(--kr-sp-3) var(--kr-sp-4);
  margin-bottom: var(--kr-sp-5);
}
.mcp-autodiscovery-banner-icon {
  color: var(--kr-info, #60a5fa);
  flex-shrink: 0;
  margin-top: 2px;
}
.mcp-autodiscovery-banner-body {
  flex: 1;
  min-width: 0;
}
.mcp-autodiscovery-banner-body strong {
  display: block;
  font-size: var(--kr-fs-sm);
  color: var(--kr-info, #60a5fa);
  margin-bottom: var(--kr-sp-1);
}
.mcp-autodiscovery-banner-body p {
  margin: 0;
  font-size: var(--kr-fs-xs);
  color: var(--kr-text-secondary);
  line-height: 1.5;
}
.mcp-autodiscovery-banner-cta {
  flex-shrink: 0;
  align-self: center;
  color: var(--kr-info, #60a5fa);
  border-color: rgba(var(--kr-info-rgb, 96, 165, 250), 0.35);
}

/* ── 0.8.6 (#33 fix 2026-05-21) Export-as-JSON modal ──────
 * Inline modal so we have a guaranteed user-visible surface for the
 * exported spec — clipboard alone is unreliable inside Tauri webviews
 * (silent permission denial). Textarea is readonly + auto-selected. */
.mcp-export-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--kr-sp-4);
}
.mcp-export-modal {
  background: var(--kr-bg-surface);
  border: 1px solid var(--kr-border-medium);
  border-radius: var(--kr-r-lg);
  padding: var(--kr-sp-5);
  width: min(640px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: var(--kr-sp-3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.mcp-export-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: var(--kr-fs-base);
  color: var(--kr-text-primary);
}
.mcp-export-modal-hint {
  margin: 0;
  font-size: var(--kr-fs-sm);
  color: var(--kr-text-secondary);
  line-height: 1.5;
}

/* ── 0.8.6 (#33) Import-from-JSON form helpers ──────────── */
.mcp-form-error {
  margin-top: var(--kr-sp-2);
  padding: var(--kr-sp-2) var(--kr-sp-3);
  border-radius: var(--kr-r-md);
  background: rgba(var(--kr-error-rgb, 239, 68, 68), 0.10);
  border: 1px solid rgba(var(--kr-error-rgb, 239, 68, 68), 0.35);
  color: var(--kr-error, #ef4444);
  font-size: var(--kr-fs-sm);
}
.mcp-form-hint {
  margin-top: var(--kr-sp-3);
  font-size: var(--kr-fs-xs);
  color: var(--kr-text-faint);
  line-height: 1.5;
}
