/* Integrações */
.ints {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 900px;
}
.int {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  flex-wrap: wrap;
}
.int .logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.int .txt {
  flex: 1;
  min-width: 200px;
}
.int .txt b {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}
.int .txt span {
  color: var(--muted);
  font-size: 14.5px;
}
.conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 600;
  font-size: 13.5px;
  padding: 5px 12px;
  border-radius: 999px;
}
.conn::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* Configurações */
.cfg {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.subnav {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.subnav button {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 9px;
  font-weight: 500;
  font-size: 15px;
  color: var(--fg-2);
}
.subnav button:hover {
  background: var(--head);
}
.subnav button.on {
  background: var(--primary-soft);
  color: var(--primary);
}
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form h2 {
  margin: 0;
}
.f2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field label {
  font-weight: 600;
  font-size: 14.5px;
}
.field small {
  color: var(--muted);
}
.field input,
.field textarea,
.field > select {
  border: 1px solid #d9dbe5;
  border-radius: 9px;
  padding: 11px 12px;
  background: var(--card);
  color: var(--fg);
  width: 100%;
}
.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}
.range {
  display: flex;
  align-items: center;
  gap: 16px;
}
.range input[type='range'] {
  flex: 1;
  accent-color: var(--primary);
}
.range input[type='number'] {
  width: 72px;
  text-align: center;
}
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.switch small {
  color: var(--muted);
}
.switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}
.form-foot {
  display: flex;
  justify-content: flex-end;
}

/* Configuração das integrações: token só de escrita, erros por campo e resultado do teste */
.int .txt .int-src {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.secret-row {
  display: flex;
  gap: 8px;
}
.secret-row input {
  flex: 1;
  min-width: 0;
}
.secret-saved {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.secret-saved .mask {
  letter-spacing: 2px;
  color: var(--muted);
}
.saved-tag {
  font-size: 12px;
  color: var(--green, #15803d);
}
.field .err {
  color: var(--red-ink);
  min-height: 0;
}
.field .err:empty {
  display: none;
}
.field [aria-invalid='true'] {
  border-color: var(--red);
}
.int-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red-ink);
  font-size: 13px;
}
.int-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0 2px;
}
.int-result {
  margin-top: 10px;
  font-size: 13px;
}
.int-result:empty {
  display: none;
}
.int-result.ok {
  color: var(--green, #15803d);
}
.int-result.bad {
  color: var(--red-ink);
}
.link-btn {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue, #2f6fd6);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
}

#igFields .field {
  margin-bottom: 8px;
}

.int-lock {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
}
.int-lock.ok {
  color: var(--green);
}
.int-lock.bad {
  color: var(--red-ink);
}
