/* Connectors and Settings (views/connectors.js). Kit tokens only. Cards from the live product's connectors page (live/01). */

/* Letter avatar tile, toned per category */
.cx-logo { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--border); background: var(--muted); color: var(--foreground); }
.cx-logo.lg { width: 40px; height: 40px; border-radius: var(--radius-lg); font-size: 14px; }
.cx-logo.erp { background: var(--artifact-wash-grid); color: var(--artifact-grid); }
.cx-logo.hr { background: var(--artifact-wash-canvas); color: var(--artifact-canvas); }
.cx-logo.psa { background: var(--artifact-wash-docx); color: var(--artifact-docx); }
.cx-logo.contracts { background: var(--muted-brand); color: var(--primary); }
.cx-logo.files { background: var(--artifact-wash-excel); color: var(--artifact-excel); }

/* Catalogue: three-column cards */
.cx-cat { margin-top: 32px; }
.cx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cx-card { display: flex; align-items: flex-start; gap: 12px; min-height: 88px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); transition: box-shadow var(--motion-quick), border-color var(--motion-quick); }
.cx-card:hover { box-shadow: var(--shadow-md); }
.cx-card.on { background: var(--background-brand); }
.cx-card-main { flex: 1; min-width: 0; }
.cx-card-name { font-weight: 600; line-height: 20px; }
.cx-card-desc { margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--muted-foreground); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-card-act { flex: none; margin: -4px -4px 0 0; }
.cx-card-act svg.lucide { color: var(--muted-foreground); }
.cx-card:hover .cx-card-act { background: var(--accent); }

/* Connected: richer cards */
.cx-connected { margin-top: 8px; }
.cx-conn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cx-conn { display: flex; flex-direction: column; gap: 16px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow var(--motion-quick), border-color var(--motion-quick); min-width: 0; }
.cx-conn:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.cx-conn-head { display: flex; align-items: flex-start; gap: 12px; }
.cx-conn-name { font-size: 15px; line-height: 20px; font-weight: 600; }
.cx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 12px; border-radius: var(--radius-lg); background: var(--muted); }
.cx-stats.boxed { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cx-stats dt { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.cx-stats dd { margin: 4px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-unit { font-weight: 400; color: var(--muted-foreground); font-size: 12px; }
.cx-conn-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.cx-conn-foot .t-meta { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.cx-conn-foot .t-meta svg.lucide { width: 12px; height: 12px; }
.cx-empty { border: 1px dashed var(--border); border-radius: var(--radius-xl); }

/* Detail panel */
.cx-detail { display: flex; flex-direction: column; gap: 24px; }
.cx-detail-top { display: flex; align-items: center; gap: 12px; }
.cx-feeds { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--background-brand); color: var(--foreground); }
.cx-feeds svg.lucide { color: var(--primary); }
.cx-h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; line-height: 20px; font-weight: 600; }
.cx-arrow { color: var(--muted-foreground); }

/* Connect dialog */
.cx-dialog { display: flex; flex-direction: column; gap: 16px; }
.cx-note { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-foreground); }
.cx-note svg.lucide { color: var(--primary); width: 14px; height: 14px; }

/* Settings: left section nav + body */
.cx-settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.cx-set-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; }
.cx-set-nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--radius-md); color: var(--foreground); font-weight: 400; }
.cx-set-nav a:hover { background: var(--accent); }
.cx-set-nav a.active { background: var(--background); font-weight: 500; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border); }
.cx-set-nav a svg.lucide { color: var(--muted-foreground); }
.cx-set-nav a.active svg.lucide { color: var(--primary); }
.cx-set-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cx-set-title { font-size: 18px; line-height: 28px; font-weight: 600; }
.cx-against { color: var(--muted-foreground); }
.cx-member { display: flex; align-items: center; gap: 12px; }

@media (max-width: 1180px) {
  .cx-grid, .cx-conn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cx-settings { grid-template-columns: 1fr; }
  .cx-set-nav { flex-direction: row; flex-wrap: wrap; position: static; }
}
@media (max-width: 640px) {
  .cx-grid, .cx-conn-grid { grid-template-columns: 1fr; }
  .cx-stats.boxed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Round 2: connect flow (A2) */
.cx-wiz-steps { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cx-wiz-steps li { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; padding-top: 8px; border-top: 2px solid var(--border); font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.cx-wiz-steps li.on { border-color: var(--primary); color: var(--foreground); font-weight: 500; }
.cx-wiz-steps li.done { border-color: var(--primary); }
.cx-wiz-n { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: var(--radius-full); background: var(--muted); font-size: 11px; }
.cx-wiz-steps li.on .cx-wiz-n, .cx-wiz-steps li.done .cx-wiz-n { background: var(--primary); color: var(--primary-foreground); }
.cx-wiz-n svg.lucide { width: 12px; height: 12px; }
.cx-wiz-sec { display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
.cx-scopes { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cx-scope { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; cursor: pointer; }
.cx-scope + .cx-scope { border-top: 1px solid var(--border); }
.cx-scope:hover { background: var(--accent); }
.cx-map { display: flex; flex-direction: column; gap: 6px; }
.cx-map-row { display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1.2fr) 64px; align-items: center; gap: 8px; }
.cx-map-row .badge { justify-self: end; }
.cx-done { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-lg); background: var(--background-brand); }
/* Vendor logos: white tile, logo contained */
.cx-logo.img { background: var(--background); padding: 5px; }
.cx-logo.img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* QA fixes: V7 field names in the sans face (kit rule: sans only), instance name and id on separate lines; V8 last sync never truncates. */
.cx-mono { font-family: inherit; font-size: 13px; color: var(--foreground); }
.cx-scope .cell-main, .cx-scope .cell-sub { display: block; }
.cx-scope .cell-sub { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.cx-stats dd { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
