/* Circlo Iteration 6 - friends and follows.
   ASCII-only source to avoid encoding regressions. */

.i6-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.i6-profile-actions button {
  white-space: nowrap;
}

.i6-profile-actions .i6-danger {
  border-color: #dc2626;
  color: #b91c1c;
}

.i6-profile-actions .i6-accept {
  background: var(--brand, #2563eb);
  color: #fff;
}

.i6-connection-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--muted, #64748b);
  font-size: .86rem;
}

.i6-connection-stats button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.i6-connection-stats button:hover {
  color: var(--brand, #2563eb);
  text-decoration: underline;
}

.i6-friends-view {
  width: min(980px, calc(100% - 24px));
  margin: 18px auto 44px;
}

.i6-friends-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.i6-friends-head h2 {
  margin: 0 0 5px;
}

.i6-friends-head p {
  margin: 0;
  color: var(--muted, #64748b);
  line-height: 1.45;
}

.i6-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.i6-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.i6-tabs button.active {
  background: var(--brand-soft, #dbeafe);
  color: var(--brand, #1d4ed8);
}

.i6-pane {
  min-height: 160px;
}

.i6-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.i6-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  background: var(--surface, #fff);
}

.i6-card-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #dbeafe;
  border: 1px solid var(--border, #dbe3ef);
}

.i6-card-avatar.i6-avatar-fallback {
  display: grid;
  place-items: center;
  color: #1d4ed8;
  font-weight: 800;
}

.i6-card-main {
  min-width: 0;
}

.i6-card-main strong,
.i6-card-main span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.i6-card-main span {
  margin-top: 2px;
  color: var(--muted, #64748b);
  font-size: .83rem;
}

.i6-card-meta {
  margin-top: 6px !important;
  font-size: .78rem !important;
}

.i6-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.i6-card-actions button {
  flex: 1;
  min-width: 110px;
}

.i6-empty,
.i6-loading {
  padding: 34px 18px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  background: var(--surface, #fff);
  text-align: center;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

.i6-count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  box-sizing: border-box;
}

.i6-list-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100800;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15,23,42,.68);
  backdrop-filter: blur(8px);
}

.i6-list-backdrop.hidden {
  display: none !important;
}

.i6-list-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  box-shadow: 0 28px 80px rgba(0,0,0,.28);
}

body.dark .i6-list-card {
  background: #111827;
  color: #e5e7eb;
}

.i6-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: inherit;
}

.i6-list-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.i6-list-body {
  padding: 8px;
}

.i6-list-row {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 12px;
}

.i6-list-row:hover {
  background: var(--surface-2, #f8fafc);
}

.i6-list-row .i6-card-avatar {
  width: 46px;
  height: 46px;
}

.i6-list-person {
  min-width: 0;
  cursor: pointer;
}

.i6-list-person strong,
.i6-list-person span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.i6-list-person span {
  margin-top: 2px;
  color: var(--muted, #64748b);
  font-size: .82rem;
}

.i6-list-note {
  padding: 10px 14px 14px;
  color: var(--muted, #64748b);
  font-size: .8rem;
}

@media (max-width: 760px) {
  .i6-grid {
    grid-template-columns: 1fr;
  }

  .i6-friends-view {
    width: calc(100% - 14px);
    margin-top: 10px;
  }

  .i6-profile-actions {
    width: 100%;
    margin-left: 0;
  }

  .i6-profile-actions button {
    flex: 1;
  }

  .i6-list-backdrop {
    padding: 0;
    align-items: end;
  }

  .i6-list-card {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }
}
