/* ============================================================
   NICO by Macrodeep — MCP connector DETAIL + custom SETUP
   Extends nico.css + nico-settings.css. Same tokens, same chrome.
   ============================================================ */

/* narrower reading column for these focused pages */
.set-main.detail .set-main-inner { max-width: 1000px; padding-top: 26px; }

/* back-to-list crumb action above hero */
.detail-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; color: var(--text-4);
  text-decoration: none; margin-bottom: 18px; transition: color .12s;
}
.detail-back:hover { color: var(--text-2); }
.detail-back svg { width: 13px; height: 13px; }

/* ============================================================
   DETAIL HERO
   ============================================================ */
.mcp-hero {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: start;
  padding-bottom: 22px; border-bottom: 0.5px solid var(--line-soft); margin-bottom: 24px;
}
.mcp-hero .hero-ic {
  width: 60px; height: 60px; border-radius: 16px; flex: none; display: grid; place-items: center;
  font-family: var(--mono); font-size: 20px; font-weight: 700; color: #fff;
  box-shadow: 0 4px 16px oklch(0 0 0 / 0.3), inset 0 1px 0 oklch(1 0 0 / 0.18);
  overflow: hidden;
}
.mcp-hero .hero-ic.has-logo { background: #fff !important; box-shadow: 0 4px 16px oklch(0 0 0 / 0.2), inset 0 0 0 0.5px oklch(0 0 0 / 0.08); }
.mcp-hero .hero-ic .hero-logo { width: 70%; height: 70%; object-fit: contain; display: block; }
.mcp-hero .hero-text { min-width: 0; }
.mcp-hero h2 {
  font-size: 25px; font-weight: 600; letter-spacing: -0.022em; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.mcp-hero h2 .verified { color: var(--info); display: inline-flex; }
.mcp-hero .hero-pub {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-4); margin-top: 6px;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.mcp-hero .hero-pub .dotsep { color: var(--text-4); opacity: 0.5; }
.mcp-hero .hero-desc {
  font-size: 13.5px; color: var(--text-3); line-height: 1.55; margin-top: 12px; max-width: 560px;
}
.mcp-hero .hero-cta { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: none; }
.mcp-hero .hero-cta .btn { justify-content: center; }

/* status pill in hero */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px;
  border-radius: 20px; font-family: var(--mono); font-size: 11px; font-weight: 500;
  border: 0.5px solid oklch(0.805 0.15 150 / 0.4); color: var(--ok); background: var(--ok-dim);
  white-space: nowrap;
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 7px var(--ok); }

/* hero meta strip */
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 26px; }
.hero-meta .hm { display: flex; flex-direction: column; gap: 3px; }
.hero-meta .hm .hk { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-4); }
.hero-meta .hm .hv { font-family: var(--mono); font-size: 14px; color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.hero-meta .hm .hv svg { width: 13px; height: 13px; color: var(--run); }
.hero-meta .hm .hv .up { color: var(--ok); }

/* ============================================================
   DETAIL BODY — content + sidebar
   ============================================================ */
.detail-grid { display: grid; grid-template-columns: 1fr 290px; gap: 28px; align-items: start; }
.detail-main { min-width: 0; }
/* narrow viewports (e.g. small windows): stack the health/publisher sidebar below
   the main column so the config form keeps full width and never clips */
@media (max-width: 1080px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
}

/* segmented tab strip */
.detail-tabs {
  display: flex; gap: 2px; border-bottom: 0.5px solid var(--line); margin-bottom: 22px;
}
.detail-tab {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3); background: transparent;
  border: none; padding: 9px 13px 11px; cursor: pointer; position: relative; transition: color .12s;
  display: flex; align-items: center; gap: 7px;
}
.detail-tab:hover { color: var(--text-2); }
.detail-tab.on { color: var(--text); }
.detail-tab.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -0.5px; height: 2px; background: var(--accent); border-radius: 2px; }
.detail-tab .tc { font-family: var(--mono); font-size: 9.5px; padding: 1px 6px; border-radius: 20px; background: var(--surface-3); color: var(--text-4); border: 0.5px solid var(--line-soft); }
.detail-tab.on .tc { background: var(--accent-dim); color: var(--accent-text); border-color: var(--accent-line); }

.detail-panel { display: none; }
.detail-panel.on { display: block; }
@media (prefers-reduced-motion: no-preference) { .detail-panel.on { animation: panelIn .22s cubic-bezier(0.2,0,0,1); } }

/* ---- TOOLS list ---- */
.tool-list { display: flex; flex-direction: column; gap: 10px; }
.tool-def {
  background: var(--surface-1); border: 0.5px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: border-color .14s;
}
.tool-def:hover { border-color: var(--line-bright); }
.tool-def .td-head {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer;
}
.tool-def .td-sig { font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 500; min-width: 0; }
.tool-def .td-sig .fn { color: var(--accent-text); }
.tool-def .td-sig .args { color: var(--text-3); }
.tool-def .td-badge {
  font-family: var(--mono); font-size: 9.5px; padding: 2px 8px; border-radius: 6px; flex: none;
  border: 0.5px solid var(--line-soft); background: var(--surface-2); color: var(--text-3);
}
.tool-def .td-badge.write { color: var(--run); border-color: oklch(0.83 0.15 85 / 0.4); background: var(--run-dim); }
.tool-def .td-badge.read { color: var(--info); border-color: oklch(0.77 0.11 240 / 0.4); background: var(--info-dim); }
.tool-def .td-spacer { flex: 1; }
.tool-def .td-calls { font-family: var(--mono); font-size: 10.5px; color: var(--text-4); flex: none; }
.tool-def .td-chev { width: 16px; height: 16px; color: var(--text-4); flex: none; transition: transform .18s; }
.tool-def.open .td-chev { transform: rotate(90deg); }
.tool-def .td-body {
  display: none; border-top: 0.5px solid var(--line-soft);
  padding: 14px 16px; background: oklch(0.145 0.006 264);
}
.tool-def.open .td-body { display: block; }
.tool-def .td-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin-bottom: 12px; }
.td-params { display: flex; flex-direction: column; gap: 0; }
.td-param {
  display: grid; grid-template-columns: 150px auto 1fr; gap: 12px; align-items: baseline;
  padding: 7px 0; border-top: 0.5px solid var(--line-soft); font-size: 12px;
}
.td-param:first-child { border-top: none; }
.td-param .pn { font-family: var(--mono); font-size: 11.5px; color: var(--text); }
.td-param .pn .req { color: var(--err); margin-left: 2px; }
.td-param .pt { font-family: var(--mono); font-size: 10.5px; color: var(--accent-text); }
.td-param .pd { color: var(--text-4); line-height: 1.45; }

/* theme-aware tool body bg */
[data-theme="light"] .tool-def .td-body, [data-theme="sierra"] .tool-def .td-body { background: var(--surface-2); }

/* ---- PERMISSIONS / SCOPES ---- */
.scope-row {
  display: flex; align-items: center; gap: 13px; padding: 13px 16px;
  border-bottom: 0.5px solid var(--line-soft);
}
.scope-row:last-child { border-bottom: none; }
.scope-row .sc-ic {
  width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 0.5px solid var(--line); color: var(--text-3);
}
.scope-row .sc-ic svg { width: 15px; height: 15px; }
.scope-row .sc-ic.write { color: var(--run); border-color: oklch(0.83 0.15 85 / 0.35); }
.scope-row .sc-body { flex: 1; min-width: 0; }
.scope-row .sc-t { font-size: 13px; color: var(--text); font-weight: 500; }
.scope-row .sc-t code { font-family: var(--mono); font-size: 11px; color: var(--accent-text); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; margin-left: 7px; }
.scope-row .sc-d { font-size: 11.5px; color: var(--text-4); margin-top: 3px; line-height: 1.4; }
.scope-row .sc-state { font-family: var(--mono); font-size: 10px; color: var(--ok); flex: none; display: inline-flex; align-items: center; gap: 5px; }
.scope-row .sc-state svg { width: 13px; height: 13px; }

/* ---- ACTIVITY ---- */
.activity { display: flex; flex-direction: column; }
.act-row {
  display: grid; grid-template-columns: 16px 1fr auto; gap: 13px; align-items: start;
  padding: 12px 4px; border-bottom: 0.5px solid var(--line-soft);
}
.act-row:last-child { border-bottom: none; }
.act-row .ad { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--ok); }
.act-row .ad.err { background: var(--err); }
.act-row .at { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.act-row .at code { font-family: var(--mono); font-size: 11px; color: var(--accent-text); }
.act-row .at b { color: var(--text); font-weight: 500; }
.act-row .am { font-family: var(--mono); font-size: 10.5px; color: var(--text-4); white-space: nowrap; }

/* ============================================================
   DETAIL SIDEBAR
   ============================================================ */
.detail-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.side-card {
  background: var(--surface-1); border: 0.5px solid var(--line); border-radius: var(--r-lg);
  padding: 15px 16px;
}
.side-card .sc-label {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-4); margin-bottom: 12px;
}
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 0.5px solid var(--line-soft); }
.kv-row:first-of-type { border-top: none; }
.kv-row .kk { font-size: 12px; color: var(--text-4); }
.kv-row .kvv { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kv-row .kvv .av { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 8px; font-weight: 700; color: #fff; font-family: var(--mono); }

/* health meter */
.health { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.health .hbar { flex: 1; height: 7px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.health .hbar i { display: block; height: 100%; border-radius: 5px; background: var(--ok); }
.health .hpct { font-family: var(--mono); font-size: 12px; color: var(--ok); font-weight: 600; }

/* used-in-runs mini list */
.run-mini { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 0.5px solid var(--line-soft); }
.run-mini:first-of-type { border-top: none; }
.run-mini .rm-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.run-mini .rm-dot.done { background: var(--ok); }
.run-mini .rm-dot.run { background: var(--run); box-shadow: 0 0 0 3px var(--run-dim); }
.run-mini .rm-t { font-size: 12px; color: var(--text-2); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-mini .rm-m { font-family: var(--mono); font-size: 10px; color: var(--text-4); flex: none; }

/* ============================================================
   CUSTOM MCP SETUP
   ============================================================ */
.setup-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.setup-main { min-width: 0; display: flex; flex-direction: column; }

/* stepper */
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.stepper .step { display: flex; align-items: center; gap: 9px; }
.stepper .step .sdot {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  background: var(--surface-2); border: 0.5px solid var(--line); color: var(--text-4);
  transition: all .2s;
}
.stepper .step .sname { font-family: var(--mono); font-size: 11.5px; color: var(--text-4); transition: color .2s; }
.stepper .step.on .sdot { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 2px 10px var(--accent-dim); }
.stepper .step.on .sname { color: var(--text); }
.stepper .step.done .sdot { background: var(--accent-dim); border-color: var(--accent-line); color: var(--accent-text); }
.stepper .step.done .sname { color: var(--text-2); }
.stepper .sline { flex: 1; height: 0.5px; background: var(--line); margin: 0 14px; min-width: 22px; }
.stepper .step.done + .sline { background: var(--accent-line); }

/* form blocks */
.form-block { margin-bottom: 26px; }
.form-block > .fb-title { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; margin-bottom: 4px; }
.form-block > .fb-sub { font-size: 12.5px; color: var(--text-4); line-height: 1.5; margin-bottom: 16px; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 500; margin-bottom: 7px; }
.field > label .opt { font-family: var(--mono); font-size: 10px; color: var(--text-4); font-weight: 400; margin-left: 7px; }
.field .fhint { font-size: 11.5px; color: var(--text-4); margin-top: 7px; line-height: 1.45; }
.field .fhint code { font-family: var(--mono); font-size: 10.5px; color: var(--accent-text); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.txt-input.full { width: 100%; min-width: 0; }
textarea.txt-input { width: 100%; resize: vertical; min-height: 70px; line-height: 1.55; }

/* transport segmented selector */
.seg-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg-pick .sp-opt {
  text-align: left; padding: 12px 13px; border-radius: var(--r-md); cursor: pointer;
  background: var(--surface-1); border: 0.5px solid var(--line); transition: all .12s; position: relative;
}
.seg-pick .sp-opt:hover { border-color: var(--line-bright); }
.seg-pick .sp-opt.sel { border-color: var(--accent-line); background: var(--accent-dim); }
.seg-pick .sp-opt .spo-t { font-family: var(--mono); font-size: 12px; color: var(--text); font-weight: 600; }
.seg-pick .sp-opt .spo-d { font-size: 11px; color: var(--text-4); margin-top: 4px; line-height: 1.4; }
.seg-pick .sp-opt.sel .spo-t { color: var(--accent-text); }
.seg-pick .sp-opt .spo-check { position: absolute; top: 11px; right: 11px; width: 14px; height: 14px; color: var(--accent-text); opacity: 0; transition: opacity .12s; }
.seg-pick .sp-opt.sel .spo-check { opacity: 1; }

/* transport-conditional groups */
.transport-fields { display: none; }
.transport-fields.on { display: block; animation: panelIn .2s cubic-bezier(0.2,0,0,1); }

/* key/value env rows */
.kv-editor { display: flex; flex-direction: column; gap: 8px; }
.kv-edit-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.kv-edit-row .txt-input { min-width: 0; width: 100%; }
.kv-del {
  width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 0.5px solid var(--line); color: var(--text-4); cursor: pointer; transition: all .12s;
}
.kv-del:hover { color: var(--err); border-color: oklch(0.69 0.19 25 / 0.4); }
.kv-del svg { width: 14px; height: 14px; }
.kv-add {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px;
  color: var(--accent-text); background: none; border: none; cursor: pointer; padding: 4px 0; margin-top: 2px;
}
.kv-add svg { width: 13px; height: 13px; }
.kv-add:hover { filter: brightness(1.1); }

/* verify / discover block */
.verify-block {
  background: var(--surface-1); border: 0.5px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; margin-bottom: 26px;
}
.verify-head { display: flex; align-items: center; gap: 12px; }
.verify-head .vh-ic {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 0.5px solid var(--line); color: var(--text-3);
}
.verify-head .vh-ic svg { width: 17px; height: 17px; }
.verify-head .vh-t { font-size: 13px; color: var(--text); font-weight: 500; }
.verify-head .vh-d { font-family: var(--mono); font-size: 11px; color: var(--text-4); margin-top: 2px; }
.verify-head .vh-spacer { flex: 1; }

/* connection log (appears on verify) */
.conn-log {
  display: none; margin-top: 14px; border-top: 0.5px solid var(--line-soft); padding-top: 13px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.7;
}
.conn-log.on { display: block; }
.conn-log .cl-line { display: flex; align-items: center; gap: 9px; color: var(--text-3); opacity: 0; transform: translateY(3px); animation: clIn .3s ease forwards; }
.conn-log .cl-line .ci { width: 14px; flex: none; display: grid; place-items: center; }
.conn-log .cl-line.ok .ci { color: var(--ok); }
.conn-log .cl-line .ct b { color: var(--text); font-weight: 500; }
.conn-log .cl-line .ct .acc { color: var(--accent-text); }
@keyframes clIn { to { opacity: 1; transform: none; } }

/* discovered tools (appears after verify) */
.discovered { display: none; margin-bottom: 26px; }
.discovered.on { display: block; animation: panelIn .3s cubic-bezier(0.2,0,0,1); }
.disc-head {
  display: flex; align-items: center; gap: 9px; margin-bottom: 13px;
  font-family: var(--mono); font-size: 11px; color: var(--ok); font-weight: 500;
}
.disc-head svg { width: 15px; height: 15px; }
.disc-head .dh-count { color: var(--text); }
.disc-tool {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 0.5px solid var(--line); border-radius: var(--r-md); background: var(--surface-1); margin-bottom: 8px;
}
.disc-tool .dt-check {
  width: 19px; height: 19px; border-radius: 6px; flex: none; border: 1.5px solid var(--accent); background: var(--accent);
  display: grid; place-items: center; cursor: pointer; transition: all .12s;
}
.disc-tool .dt-check svg { width: 12px; height: 12px; color: var(--on-accent); }
.disc-tool.off .dt-check { background: transparent; border-color: var(--line-bright); }
.disc-tool.off .dt-check svg { opacity: 0; }
.disc-tool .dt-sig { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.disc-tool .dt-sig .fn { color: var(--accent-text); }
.disc-tool .dt-sig .args { color: var(--text-3); }
.disc-tool .dt-desc { font-size: 11.5px; color: var(--text-4); margin-top: 3px; }
.disc-tool .dt-mid { flex: 1; min-width: 0; }
.disc-tool .dt-badge {
  font-family: var(--mono); font-size: 9.5px; padding: 2px 8px; border-radius: 6px; flex: none;
  border: 0.5px solid var(--line-soft); background: var(--surface-2); color: var(--text-3);
}
.disc-tool .dt-badge.write { color: var(--run); border-color: oklch(0.83 0.15 85 / 0.4); background: var(--run-dim); }
.disc-tool .dt-badge.read { color: var(--info); border-color: oklch(0.77 0.11 240 / 0.4); background: var(--info-dim); }

/* setup footer actions */
.setup-foot {
  display: flex; align-items: center; gap: 12px; margin-top: 30px;
  padding-top: 20px; border-top: 0.5px solid var(--line-soft);
}
.setup-foot .sf-spacer { flex: 1; }
.btn.lg { height: 38px; padding: 0 18px; font-size: 12px; }

/* ---- setup sidebar: live preview of config ---- */
.setup-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; }
.cfg-preview {
  background: var(--surface-1); border: 0.5px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.cfg-preview .cfg-bar {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px;
  border-bottom: 0.5px solid var(--line-soft); background: var(--surface-2);
  font-family: var(--mono); font-size: 10.5px; color: var(--text-4);
}
.cfg-preview .cfg-bar .dots { display: flex; gap: 5px; }
.cfg-preview .cfg-bar .dots i { width: 9px; height: 9px; border-radius: 50%; }
.cfg-preview .cfg-bar .dots i:nth-child(1) { background: #ff5f57; }
.cfg-preview .cfg-bar .dots i:nth-child(2) { background: #febc2e; }
.cfg-preview .cfg-bar .dots i:nth-child(3) { background: #28c840; }
.cfg-preview .cfg-bar .fn { margin-left: 4px; }
.cfg-preview pre {
  padding: 14px 15px; font-family: var(--mono); font-size: 11.5px; line-height: 1.7;
  color: var(--text-3); overflow-x: auto; background: oklch(0.145 0.006 264);
}
[data-theme="light"] .cfg-preview pre, [data-theme="sierra"] .cfg-preview pre { background: var(--surface-1); }
.cfg-preview pre .pk { color: oklch(0.82 0.12 230); }
.cfg-preview pre .ps { color: var(--accent-text); }
.cfg-preview pre .pp { color: var(--text-4); }

.help-card {
  background: var(--surface-1); border: 0.5px solid var(--line); border-radius: var(--r-lg); padding: 15px 16px;
}
.help-card .hc-t { font-size: 12.5px; color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.help-card .hc-t svg { width: 15px; height: 15px; color: var(--accent-text); }
.help-card .hc-d { font-size: 11.5px; color: var(--text-4); line-height: 1.55; }
.help-card .hc-d a { color: var(--accent-text); text-decoration: none; }
.help-card .hc-d a:hover { text-decoration: underline; }

/* security callout */
.callout {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--r-md);
  background: var(--run-dim); border: 0.5px solid oklch(0.83 0.15 85 / 0.32); margin-bottom: 22px;
}
.callout .co-ic { color: var(--run); flex: none; margin-top: 1px; }
.callout .co-ic svg { width: 16px; height: 16px; }
.callout .co-t { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.callout .co-t b { color: var(--text); font-weight: 600; }

/* ============================================================
   EDITABLE ENDPOINT / SETUP CARD (config tab)
   ============================================================ */
.endpoint-card {
  background: var(--surface-1); border: 0.5px solid var(--line); border-radius: var(--r-lg);
  padding: 17px 18px; margin-bottom: 14px; transition: border-color .15s;
}
.endpoint-card.editing { border-color: var(--accent-line); }
.endpoint-card .ec-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.endpoint-card .ec-head .ec-t { font-size: 14px; font-weight: 600; color: var(--text); }
.endpoint-card .ec-head .ec-d { font-size: 12px; color: var(--text-4); margin-top: 4px; line-height: 1.5; max-width: 460px; }
.endpoint-card .ec-head .btn { flex: none; }
.endpoint-card .ec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.endpoint-card .ec-field label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-4); margin-bottom: 6px; }
.endpoint-card .ec-field .txt-input.full { width: 100%; }
.endpoint-card .ec-field select.txt-input { width: 100%; }
.endpoint-card .txt-input[readonly], .endpoint-card .txt-input:disabled {
  color: var(--text-2); background: var(--surface-2); cursor: default; opacity: 1;
}
.endpoint-card.editing .txt-input:not([readonly]):not(:disabled) { color: var(--text); background: var(--surface-1); }
/* actions row only visible while editing */
.endpoint-card .ec-actions { display: none; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 0.5px solid var(--line-soft); }
.endpoint-card.editing .ec-actions { display: flex; }
.endpoint-card .ec-msg { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; color: var(--text-4); }
.endpoint-card .ec-msg.ok { color: var(--ok); }
.endpoint-card .ec-msg svg { width: 14px; height: 14px; }

/* ---- Quick-connect panel (prefilled from the catalog, ?c=slug) ---- */
.quick-connect {
  background: var(--surface-1); border: 0.5px solid var(--line-bright);
  border-radius: 16px; margin: 0 0 20px; overflow: hidden;
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.03) inset;
}
.quick-connect .qc-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 0.5px solid var(--line); background: var(--surface-2);
}
.quick-connect .qc-ic {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-family: var(--mono); font-weight: 700;
  font-size: 13px; text-transform: uppercase;
  background: var(--brand-blue, #507099); color: #fff;
}
.quick-connect .qc-meta { flex: 1; min-width: 0; }
.quick-connect .qc-t { font-weight: 600; font-size: 15px; }
.quick-connect .qc-d { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.quick-connect .qc-soon {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--warn, #d08700); border: 0.5px solid currentColor; border-radius: 5px; padding: 1px 5px; vertical-align: middle;
}
.quick-connect .qc-docs {
  font-size: 12px; color: var(--text-3); text-decoration: none; white-space: nowrap;
  border: 0.5px solid var(--line-bright); border-radius: 8px; padding: 6px 10px;
}
.quick-connect .qc-docs:hover { color: var(--text); background: var(--hover); }
.quick-connect .qc-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.quick-connect .qc-lab {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-4); margin-top: 8px;
}
.quick-connect .qc-lab:first-child { margin-top: 0; }
.quick-connect .qc-hint { text-transform: none; letter-spacing: 0; color: var(--text-3); font-size: 10.5px; }
.quick-connect input.txt-input[readonly] { opacity: 0.7; cursor: default; }
/* one-click OAuth card: per-user credential fields (Gong's Client ID/Secret)
   stack like the main form — the card div isn't a flex column like .qc-body */
.quick-connect .qc-rec .qc-lab { display: block; margin-bottom: 4px; }
.quick-connect .qc-rec .txt-input { display: block; width: 100%; margin-bottom: 4px; }
.quick-connect .qc-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.quick-connect .qc-msg { flex: 1; font-size: 12.5px; color: var(--text-3); }
.quick-connect .qc-msg.ok  { color: var(--ok, #16a34a); }
.quick-connect .qc-msg.err { color: var(--err, #dc2626); }
.mk-card .mk-connect { /* same affordance as Manage */ }

/* Quick-connect success state */
.qc-success { width: 100%; }
.qc-succ-t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ok, #16a34a); }
.qc-succ-t svg { width: 16px; height: 16px; flex: none; }
.qc-succ-d { font-size: 12.5px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.qc-succ-btns { display: flex; gap: 8px; margin-top: 14px; }
.qc-succ-btns .btn svg { width: 13px; height: 13px; }

/* native-integration connect guide (no endpoint/key editor) */
.native-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.native-steps .ns-row { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--text-2); }
.native-steps .ns-n { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-2); border: 0.5px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.native-steps b { color: var(--text); font-weight: 600; }
