/* ═══════════════════════════════════════════════════════
   Connections Module — 已接入账号 / 断开并删除数据
   ═══════════════════════════════════════════════════════ */

.cn-module {
  padding: 32px 40px 60px;
  max-width: 960px;
  margin: 0 auto;
  font-family: -apple-system, 'SF Pro Display', 'PingFang SC', sans-serif;
}

/* ── Header ── */
.cn-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.cn-title { font-size: 22px; font-weight: 700; color: #0f172a; letter-spacing: -0.03em; margin: 0 0 6px; }
.cn-sub   { font-size: 13.5px; color: #64748b; margin: 0; max-width: 60ch; line-height: 1.6; }
.cn-link  { font-size: 13px; color: var(--color-primary, #6366f1); white-space: nowrap; text-decoration: none; margin-top: 6px; }
.cn-link:hover { text-decoration: underline; }

/* ── Groups ── */
.cn-group { margin-bottom: 22px; }
.cn-group-name {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #94a3b8; margin: 0 0 8px 2px;
}
.cn-rows {
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

/* ── Row ── */
.cn-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-light, #f1f5f9);
  transition: background .15s ease;
}
.cn-row:last-child { border-bottom: 0; }
.cn-row.is-confirming { background: #fff7f7; }
.cn-row.is-busy { opacity: .55; pointer-events: none; }

.cn-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }

.cn-platform {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  background: #f1f5f9; color: #475569;
}
.cn-platform-instagram { background: #fdf2f8; color: #be185d; }
.cn-platform-tiktok    { background: #f0fdfa; color: #0f766e; }
.cn-platform-youtube   { background: #fef2f2; color: #b91c1c; }
.cn-platform-facebook  { background: #eff6ff; color: #1d4ed8; }

.cn-handle { font-size: 14px; font-weight: 600; color: #0f172a; }

.cn-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
}
.cn-status i { font-style: normal; }
.cn-status.ok  { color: #15803d; }
.cn-status.bad { color: #b45309; }
.cn-err { font-size: 12px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }

/* ── Actions ── */
.cn-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cn-confirm-text { font-size: 12.5px; color: #b91c1c; font-weight: 600; margin-right: 4px; }

.cn-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid transparent;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all .15s ease; font-family: inherit;
}
.cn-btn-ghost        { background: transparent; color: #475569; border-color: var(--color-border, #e2e8f0); }
.cn-btn-ghost:hover  { background: #f8fafc; }
.cn-btn-ghost-danger { background: transparent; color: #b91c1c; border-color: #fecaca; }
.cn-btn-ghost-danger:hover { background: #fef2f2; border-color: #fca5a5; }
.cn-btn-danger       { background: #dc2626; color: #fff; border-color: #dc2626; }
.cn-btn-danger:hover { background: #b91c1c; }

/* ── States ── */
.cn-loading, .cn-empty {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 40px 20px; color: #94a3b8; font-size: 13.5px;
  border: 1px dashed var(--color-border, #e2e8f0); border-radius: 12px;
}

/* ── Toast ── */
.cn-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  padding: 10px 16px; border-radius: 10px;
  background: #0f172a; color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(15,23,42,.25);
  opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 9999;
}
.cn-toast.show { opacity: 1; transform: translate(-50%, 0); }
.cn-toast.bad  { background: #b91c1c; }

@media (max-width: 720px) {
  .cn-module { padding: 20px 16px 48px; }
  .cn-head { flex-direction: column; gap: 10px; }
  .cn-row { flex-direction: column; align-items: flex-start; }
  .cn-row-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}
