/* integrations.css — /app/settings/integrations page */

body {
  background: #0a0a0f;
  color: #e4e4e7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
}

/* ── Nav ── */
.int-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 860px;
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: #f4f4f5;
  text-decoration: none;
}
.nav-dot {
  width: 8px;
  height: 8px;
  background: #7c3aed;
  border-radius: 50%;
}
.nav-back {
  font-size: 13px;
  color: #71717a;
  text-decoration: none;
  transition: color 0.12s;
}
.nav-back:hover { color: #a1a1aa; }

/* ── Layout ── */
.int-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.int-header {
  margin-bottom: 36px;
}
.int-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #f4f4f5;
  margin: 0 0 6px;
}
.int-header p {
  font-size: 15px;
  color: #71717a;
  margin: 0;
}

/* ── Cards ── */
.int-card {
  background: #111116;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
}
.int-card--muted {
  opacity: 0.6;
}

.int-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}
.int-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.int-icon--muted {
  background: transparent;
}
.int-card-info {
  flex: 1;
  min-width: 0;
}
.int-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #f4f4f5;
  margin-bottom: 3px;
}
.int-card-desc {
  font-size: 13px;
  color: #71717a;
}
.int-card-status {
  flex-shrink: 0;
}

/* ── Badges ── */
.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge--active {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
}
.badge--paused {
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.25);
}
.badge--inactive {
  background: rgba(255, 255, 255, 0.05);
  color: #71717a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.badge--soon {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ── Error / warn banners ── */
.error-banner, .warn-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 24px;
  font-size: 13px;
}
.error-banner {
  background: rgba(239, 68, 68, 0.08);
  border-top: 1px solid rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.warn-banner {
  background: rgba(234, 179, 8, 0.08);
  border-top: 1px solid rgba(234, 179, 8, 0.15);
  color: #fde68a;
}
.error-icon, .warn-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.error-detail {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 3px;
}

/* ── Card body / form ── */
.int-card-body {
  padding: 0 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Setup steps */
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0 24px;
}
.setup-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: #a1a1aa;
  line-height: 1.5;
}
.step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.setup-step code {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.link {
  color: #818cf8;
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

/* Form */
.slack-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #a1a1aa;
}
.optional {
  color: #52525b;
  font-weight: 400;
}
.form-input {
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #e4e4e7;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.12s;
  font-family: inherit;
}
.form-input:focus {
  border-color: rgba(124, 58, 237, 0.5);
}
.form-input::placeholder { color: #52525b; }
.form-input.hidden { display: none; }

.masked-url-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.masked-url {
  flex: 1;
  font-size: 13px;
  color: #71717a;
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.masked-url-row.hidden { display: none; }

/* Toggle rows */
.form-toggles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}
.toggle-info { flex: 1; }
.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: #d4d4d8;
}
.toggle-desc {
  font-size: 12px;
  color: #71717a;
  margin-top: 2px;
}
.toggle-wrap {
  position: relative;
  flex-shrink: 0;
}
.toggle-wrap input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  display: block;
  width: 40px;
  height: 22px;
  background: #27272a;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #71717a;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s, background 0.2s;
}
.toggle-wrap input:checked + .toggle-slider { background: rgba(124, 58, 237, 0.4); }
.toggle-wrap input:checked + .toggle-slider::after {
  transform: translateX(18px);
  background: #a78bfa;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn-primary {
  padding: 10px 20px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #a1a1aa;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.btn-secondary:hover { border-color: rgba(255, 255, 255, 0.22); color: #d4d4d8; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Webhook meta */
.webhook-meta {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.meta-label { color: #52525b; }
.meta-value { color: #71717a; }

/* Danger zone */
.danger-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.separator { color: #3f3f46; font-size: 12px; }
.btn-text {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.12s;
}
.btn-text--muted { color: #71717a; }
.btn-text--muted:hover { color: #a1a1aa; }
.btn-text--danger { color: #71717a; }
.btn-text--danger:hover { color: #f87171; }

/* Login prompt */
.login-prompt {
  text-align: center;
  padding: 60px 24px;
}
.login-prompt h2 {
  font-size: 22px;
  font-weight: 700;
  color: #f4f4f5;
  margin: 0 0 8px;
}
.login-prompt p {
  font-size: 15px;
  color: #71717a;
  margin: 0 0 24px;
}
.btn-app {
  display: inline-block;
  padding: 12px 24px;
  background: #7c3aed;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  color: #e4e4e7;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast--success { color: #4ade80; }
.toast--error { color: #f87171; }
.toast--info { color: #a1a1aa; }
