/* integrations-admin.css — live data sources panel */

.int-admin {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 920px;
}

/* ── Demo data master card ─────────────────────────────── */
.int-demo-card {
  border: 1px solid #e8e3da;
  background: #fdfaf3;
  border-radius: 10px;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.int-demo-card.wiped {
  background: #f4f7f4;
  border-color: #d4ddd4;
}
.int-demo-head {
  display: flex;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}
.int-demo-icon {
  font-size: 22px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d8d2c4;
  display: flex; align-items: center; justify-content: center;
  color: #b07d2e;
  flex-shrink: 0;
}
.int-demo-card.wiped .int-demo-icon { color: #2c5d3f; border-color: #c8d6c8; }
.int-demo-title {
  font-size: 15px; font-weight: 600; color: #1f2723; margin-bottom: 4px;
}
.int-demo-sub {
  font-size: 13px; color: #5b5447; line-height: 1.55; max-width: 540px;
}
.int-demo-confirm {
  flex-basis: 100%;
  background: #fff;
  border: 1px solid #e8c89a;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 8px;
}
.int-demo-confirm-text {
  font-size: 13px; color: #3a342a; line-height: 1.55;
}
.int-demo-confirm-text strong { color: #8a3a1f; }
.int-demo-confirm-actions {
  display: flex; gap: 10px; margin-top: 12px; justify-content: flex-end;
}

/* ── Toolbar ─────────────────────────────────────────────── */
.int-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 4px;
  border-bottom: 1px solid #ece7dd;
}
.int-summary {
  font-size: 13px; color: #5b5447;
}
.int-summary strong { color: #1f2723; font-size: 15px; }

/* ── Group header ────────────────────────────────────────── */
.int-group {
  display: flex; flex-direction: column; gap: 12px;
}
.int-group-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8268;
  padding: 0 2px;
}
.int-group-list { display: flex; flex-direction: column; gap: 10px; }

/* ── Integration card ────────────────────────────────────── */
.int-card {
  background: #fff;
  border: 1px solid #ece7dd;
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color 0.15s;
}
.int-card-connected { border-color: #d8e2d6; }
.int-card-error     { border-color: #e6c8c0; }

.int-card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.int-logo {
  width: 36px; height: 36px;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.int-card-meta { flex: 1; min-width: 0; }
.int-card-name {
  font-size: 14px; font-weight: 600; color: #1f2723;
  display: flex; align-items: center; gap: 8px;
}
.int-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a8268;
  background: #f5f1e7;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}
.int-card-tagline {
  font-size: 12.5px; color: #5b5447; margin-top: 3px; line-height: 1.45;
}

/* status pill */
.int-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.int-status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #aaa;
}
.int-status-connected   { background: #ecf3eb; color: #2c5d3f; }
.int-status-connected   .int-status-dot { background: #4a9162; }
.int-status-disconnected{ background: #f4f1ea; color: #7a715b; }
.int-status-connecting,
.int-status-syncing     { background: #f0eef9; color: #4f4593; }
.int-status-connecting .int-status-dot,
.int-status-syncing    .int-status-dot { background: #635bff; animation: int-pulse 1s infinite; }
.int-status-error       { background: #f7ece8; color: #8a3a1f; }
.int-status-error       .int-status-dot { background: #c14a26; }

@keyframes int-pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.35; }
}

.int-card-scopes {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 10px 0 14px;
}
.int-retention-note {
  font-size: 12px;
  color: #4a6b3d;
  background: #f0f6ec;
  border: 1px solid #d8e6cf;
  padding: 7px 10px;
  border-radius: 5px;
  margin: -4px 0 12px;
  line-height: 1.45;
}
.int-scope {
  font-size: 11.5px;
  background: #f5f1e7;
  color: #5b5447;
  padding: 3px 9px;
  border-radius: 4px;
}

.int-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0ebe1;
}
.int-card-meta-line { font-size: 12px; color: #5b5447; }
.int-card-meta-line strong { color: #1f2723; }
.int-card-actions { display: flex; gap: 8px; align-items: center; }

/* buttons */
.int-btn-primary, .int-btn-secondary, .int-btn-danger, .int-btn-ghost {
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.1s;
  font-family: inherit;
}
.int-btn-primary { background: #1f3d2c; color: #fff; }
.int-btn-secondary { background: #fff; color: #1f2723; border-color: #d8d2c4; }
.int-btn-danger  { background: #8a3a1f; color: #fff; }
.int-btn-ghost   { background: transparent; color: #5b5447; border-color: #d8d2c4; }
.int-btn-primary:hover, .int-btn-secondary:hover, .int-btn-danger:hover, .int-btn-ghost:hover {
  filter: brightness(0.95);
}
.int-btn-primary:disabled, .int-btn-secondary:disabled {
  opacity: 0.5; cursor: not-allowed;
}

.int-link {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: #5b5447; text-decoration: underline;
  font-family: inherit;
}
.int-link:hover { color: #1f2723; }
.int-link-danger { color: #8a3a1f; }

/* sync result toast */
.int-sync-result {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12.5px;
}
.int-sync-result.good { background: #ecf3eb; color: #2c5d3f; }
.int-sync-result.bad  { background: #f7ece8; color: #8a3a1f; }

/* mapping panel */
.int-mapping {
  margin-top: 12px;
  background: #faf7f0;
  border: 1px solid #ece7dd;
  border-radius: 6px;
  padding: 12px 14px;
}
.int-mapping-head {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a8268;
  margin-bottom: 10px;
}
.int-mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.int-mapping-table th {
  text-align: left;
  font-weight: 500;
  color: #5b5447;
  padding: 5px 0;
  border-bottom: 1px solid #ece7dd;
}
.int-mapping-table td {
  padding: 5px 0;
  border-bottom: 1px solid #f4efe5;
  vertical-align: top;
  color: #1f2723;
  font-size: 11.5px;
  line-height: 1.5;
}
.int-mapping-table td.mono, .int-mapping-table th {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.int-arrow { color: #8a8268; margin-right: 4px; }
.int-mapping-writes {
  margin-top: 10px;
  font-size: 11.5px;
  color: #5b5447;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.int-mapping-writes code {
  background: #fff;
  border: 1px solid #ece7dd;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
}

.int-footer-note {
  font-size: 12.5px;
  color: #5b5447;
  background: #faf7f0;
  border: 1px solid #ece7dd;
  border-radius: 8px;
  padding: 14px 16px;
  line-height: 1.55;
}
.int-footer-note strong { color: #1f2723; }
.int-footer-note code {
  background: #fff;
  border: 1px solid #ece7dd;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11.5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
