/* ============================================================================
   Cadastro de Integrações — estilos da página /cadastro-integracoes
   Classes cint-*, escopadas em .v2-root / .cint-root. Reusa componentes v2.
   ============================================================================ */

.v2-root.cint-root .v2-wrap { max-width: 1280px; }

.cint-filters { margin-bottom: 18px; }
.cint-filter-dd { min-width: 280px; }

/* ── Abas por seção (cabeçalho de navegação) ───────────────────────────── */
.cint-tabs {
  display: flex; flex-wrap: wrap; gap: 2px;
  border-bottom: 1px solid var(--v2-border); margin-bottom: 22px;
}
.cint-tab {
  background: none; border: none; cursor: pointer; white-space: nowrap;
  padding: 10px 16px; font-size: 0.88rem; font-weight: 700;
  color: var(--v2-dim); border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: 'JetBrains Mono', monospace;
}
.cint-tab:hover { color: var(--v2-text); }
.cint-tab-active {
  color: var(--v2-accent, #009bf9);
  border-bottom-color: var(--v2-accent, #009bf9);
}

/* ── Seções + grid de cards ────────────────────────────────────────────── */
.cint-sections { display: flex; flex-direction: column; gap: 26px; }
.cint-section-title {
  font-family: 'JetBrains Mono', monospace; font-weight: 800;
  font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--v2-dim); margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--v2-border);
}
.cint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.cint-empty {
  padding: 40px 20px; text-align: center; color: var(--v2-dim);
  font-size: 0.9rem;
}

.v2-card.cint-card {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 14px; padding: 16px 16px 14px; min-height: 132px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.v2-card.cint-card.cint-card-connected {
  border-color: rgba(0,229,160,0.45);
}
.v2-card.cint-card.cint-card-soon { opacity: 0.62; }

.cint-card-head { display: flex; align-items: center; gap: 12px; }
.cint-card-icon {
  width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.15rem;
  font-family: 'JetBrains Mono', monospace;
}
.cint-card-logo {
  width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto;
  object-fit: contain; background: #fff; padding: 4px;
}
.cint-card-titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cint-card-name { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.cint-card-sub { font-size: 0.76rem; font-weight: 600; }
.cint-sub-ok    { color: #00b884; }
.cint-sub-warn  { color: #c9a400; }
.cint-sub-alert { color: #ff4d6d; }
.cint-sub-muted { color: var(--v2-dim); }

/* Rodapé do card: conectar / (check + editar) / em breve */
.cint-card-foot { display: flex; align-items: center; }
.cint-conn-btn { width: 100%; }
.cint-card-foot-conn { justify-content: space-between; gap: 10px; }
.cint-check {
  font-weight: 700; font-size: 0.86rem; color: #00b884;
  display: inline-flex; align-items: center;
}
.cint-edit-btn { flex: 0 0 auto; }
.cint-badge-soon-pill {
  font-size: 0.74rem; font-weight: 700; color: var(--v2-dim);
  background: rgba(107,120,136,0.16); padding: 5px 12px; border-radius: 999px;
}

/* Badges legados (ainda usados em telas de status) */
.cint-badge-info  { background: rgba(0,155,249,0.16);  color: #009bf9; }
.cint-badge-warn  { background: rgba(255,215,0,0.16);  color: #c9a400; }
.cint-badge-alert { background: rgba(255,77,109,0.16); color: #ff4d6d; }
.cint-badge-muted { background: rgba(107,120,136,0.18); color: var(--v2-dim); }
.cint-badge-soon  { background: rgba(107,120,136,0.18); color: var(--v2-dim); }

/* ── Modal (coluna única, ~620px) ──────────────────────────────────────── */
.cint-modal-overlay { z-index: 1000; }
.v2-root .v2-modal.cint-modal {
  width: 90%;
  max-width: min(620px, 96vw);
  max-height: 92vh;
  padding: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.v2-root .v2-modal-close.v2-modal-close {  /* mantém o close padrão visível */
}
.cint-modal-title {
  margin: 0; padding: 22px 26px 14px;
  font-family: 'JetBrains Mono', monospace; font-weight: 800;
  font-size: 1.15rem; border-bottom: 1px solid var(--v2-border);
}
#cint-modal-body { padding: 20px 26px; overflow-y: auto; }
.cint-result { padding: 0 26px 22px; }
.cint-result:empty { padding: 0; }

/* ── Guia leigo ────────────────────────────────────────────────────────── */
.cint-guide { margin-bottom: 20px; }
.cint-guide-title {
  font-weight: 700; font-size: 0.9rem; margin-bottom: 8px;
}
.cint-guide-list {
  margin: 0 0 12px; padding-left: 20px;
  font-size: 0.88rem; line-height: 1.55; color: var(--v2-text);
}
.cint-guide-list li { margin-bottom: 5px; }
.cint-painel-btn { text-decoration: none; }
.cint-nota {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: rgba(0,155,249,0.08); color: var(--v2-text);
  font-size: 0.82rem; line-height: 1.45;
}

/* ── Form de credencial ────────────────────────────────────────────────── */
.cint-form { display: flex; flex-direction: column; gap: 16px; }
.cint-form-group { display: flex; flex-direction: column; gap: 6px; }
.cint-input-wrap { position: relative; display: flex; align-items: center; }
.cint-input { width: 100%; }
.cint-input-wrap .cint-input { padding-right: 42px; }
.cint-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem;
  opacity: 0.6; padding: 4px;
}
.cint-eye:hover { opacity: 1; }
.cint-field-help { font-size: 0.78rem; color: var(--v2-dim); line-height: 1.4; }

.cint-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--v2-border);
}

/* ── Pesquisas ─────────────────────────────────────────────────────────── */
.cint-sa-box {
  margin-bottom: 18px; padding: 14px; border-radius: 10px;
  background: rgba(45,212,191,0.08); border: 1px solid rgba(45,212,191,0.25);
}
.cint-sa-label { font-size: 0.84rem; margin-bottom: 8px; color: var(--v2-text); }
.cint-sa-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cint-sa-email {
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem;
  padding: 6px 10px; border-radius: 6px; background: rgba(128,128,128,0.12);
  word-break: break-all; flex: 1 1 auto;
}
.cint-sub { font-weight: 700; font-size: 0.85rem; margin: 18px 0 6px; }
.cint-pesq-list { margin: 0; padding-left: 20px; font-size: 0.85rem; line-height: 1.6; }
.cint-pesq-existentes { margin-top: 6px; }

/* ── OAuth "em breve" ──────────────────────────────────────────────────── */
.cint-soon-box {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px; text-align: center;
}
.cint-soon-msg { font-size: 0.85rem; color: var(--v2-dim); max-width: 360px; }

/* ── OAuth liberado (Conectar com …) ───────────────────────────────────── */
.cint-oauth-box {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px; text-align: center;
}
.cint-oauth-btn { text-decoration: none; min-width: 240px; }
.cint-oauth-status { margin-top: 4px; }

/* ── Roteamentos ativos (webhook) em destaque ──────────────────────────── */
.cint-active-box {
  margin: 16px 0 6px; padding: 12px 14px; border-radius: 10px;
  background: rgba(0,229,160,0.08); border: 1px solid rgba(0,229,160,0.30);
}
.cint-active-title {
  font-size: 0.78rem; font-weight: 700; color: #00b884; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.cint-active-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cint-active-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: var(--v2-card-bg, #fff);
  border: 1px solid rgba(0,229,160,0.45); font-size: 0.86rem; font-weight: 600;
}
.cint-active-chip-ico { color: #00b884; font-weight: 800; }
.cint-active-chip-val { font-family: 'JetBrains Mono', monospace; }
.cint-active-chip-path { color: var(--v2-dim); font-size: 0.78rem; }
.cint-add-title {
  margin: 18px 0 8px; font-size: 0.82rem; font-weight: 700;
  color: var(--v2-dim); text-transform: uppercase; letter-spacing: 0.04em;
}

/* Seção expansível "Avançado" (html.Details) */
.cint-adv { margin-top: 8px; }
.cint-adv-summary {
  cursor: pointer; font-size: 0.82rem; font-weight: 700; color: var(--v2-accent, #009bf9);
  list-style: none; padding: 6px 0; user-select: none;
}
.cint-adv-summary::-webkit-details-marker { display: none; }
.cint-adv-summary::before { content: '▸ '; font-size: 0.75rem; }
.cint-adv[open] .cint-adv-summary::before { content: '▾ '; }
.cint-adv-body { margin-top: 8px; }

/* ── Modal wide + iframe embutido (Instagram) ──────────────────────────── */
.v2-root .v2-modal.cint-modal.cint-modal-wide {
  max-width: min(1000px, 96vw);
}
.cint-embed-iframe {
  width: 100%; height: 72vh; border: none; border-radius: 0 0 12px 12px;
  display: block; background: var(--v2-bg, #0b0d12);
}
