.invite-center {
  border-color: #365b72;
  background: linear-gradient(135deg, rgba(19, 50, 65, .98), rgba(10, 28, 39, .98));
}

.invite-link {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.invite-link input {
  color: #83d8ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sms-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sms-box summary {
  cursor: pointer;
  font-weight: 850;
  color: var(--amber);
}

.sms-history {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.sms-history h3 { margin: 0 0 3px; }

.sms-receipt {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-left: 4px solid #7b8b96;
  border-radius: 10px;
  background: #091721;
}

.sms-receipt.good { border-left-color: #24bd78; }
.sms-receipt.bad { border-left-color: #ef4e5c; }
.sms-receipt.waiting { border-left-color: var(--amber); }
.sms-receipt small { display: block; color: var(--muted); }

.communication-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  min-height: 560px;
}

.communication-contacts {
  display: grid;
  align-content: start;
  gap: 7px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
  max-height: 720px;
  overflow: auto;
}

.contact-channel {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: #0a1721;
  color: var(--text);
  border: 1px solid transparent;
  padding: 11px;
}

.contact-channel:hover,
.contact-channel.active {
  border-color: #4d8bab;
  background: #112636;
}

.contact-channel b,
.contact-channel small {
  display: block;
}

.contact-channel small {
  color: var(--muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e23c48, #9f2332);
  color: white;
  font-weight: 950;
}

.avatar.large {
  width: 50px;
  height: 50px;
  font-size: 20px;
}

.contact-indicators {
  display: flex;
  gap: 4px;
}

.contact-indicators i {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #263440;
  color: #82929c;
  font-size: 10px;
  font-style: normal;
}

.contact-indicators i.on {
  background: #1da765;
  color: white;
}

.contact-indicators i.voice {
  background: #387ec0;
}

.communication-detail {
  min-width: 0;
}

.person-head,
.person-head > div,
.person-actions,
.permission-row,
.channel-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.person-head {
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.person-head h3,
.person-head p {
  margin: 0;
}

.person-head p {
  color: var(--muted);
}

.button-link {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 850;
}

.permission-row {
  flex-wrap: wrap;
  padding: 12px 0;
}

.channel-badge {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.channel-badge.good { color: #50dfa0; border-color: #238f62; }
.channel-badge.bad { color: #ff8b92; border-color: #85353b; }
.channel-badge.waiting { color: #f6ca6b; border-color: #84651f; }
.channel-badge.neutral { color: var(--muted); }

.channel-tabs {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.channel-grid > section {
  min-width: 0;
  background: #08131c;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.channel-grid h3 {
  margin: 0 0 10px;
}

.chat-timeline,
.voice-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.message {
  width: min(88%, 480px);
  padding: 9px 11px;
  border-radius: 12px;
  background: #182d3c;
  border: 1px solid #28485d;
}

.message.outbound {
  justify-self: end;
  background: #123d31;
  border-color: #22664f;
}

.message small,
.message a {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.message a { color: #70bfff; }

.voice-session {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.voice-session summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  cursor: pointer;
  background: #112331;
  font-size: 11px;
  font-weight: 800;
}

.voice-timeline {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.voice-line {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 7px;
  align-items: start;
  padding-bottom: 7px;
  border-bottom: 1px solid #1d3040;
  font-size: 11px;
}

.voice-line.assistant b { color: var(--amber); }
.voice-line.contact b { color: #70bfff; }
.voice-line small { color: var(--muted); }

@media (max-width: 900px) {
  .communication-layout,
  .channel-grid {
    grid-template-columns: 1fr;
  }
  .communication-contacts {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 10px;
    max-height: 300px;
  }
}

@media (max-width: 620px) {
  .invite-link,
  .communication-contacts {
    grid-template-columns: 1fr;
  }
  .person-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .person-actions {
    width: 100%;
  }
  .person-actions > * {
    flex: 1;
    text-align: center;
  }
  .voice-line {
    grid-template-columns: 1fr;
  }
}
