.profiles-page {
  width: min(100%, 720px);
  padding-top: 30px;
}

.profiles-head {
  margin-bottom: 22px;
}

.profiles-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.profiles-head p {
  margin: 2px 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-list {
  display: grid;
  gap: 16px;
}

.chat-profile-card {
  position: relative;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #2b2a28;
  padding: 18px 20px;
  color: #eee;
}

.chat-profile-card.is-default {
  border-color: #b8b8b8;
  background: #2d2b28;
}

.profile-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profile-card-title strong {
  font-size: 16px;
  line-height: 1.2;
}

.default-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 900;
}

.profile-more {
  border: 0;
  background: transparent;
  color: #a8a8a8;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}

.profile-text {
  color: #d0cbc2;
  white-space: pre-line;
  line-height: 1.25;
  font-size: 15px;
}

.profile-menu-pop {
  position: absolute;
  right: 20px;
  top: 54px;
  z-index: 3;
  width: 176px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #555;
  border-radius: 8px;
  background: #242321;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .45);
}

.profile-menu-pop button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  padding: 0 10px;
  font-weight: 800;
}

.profile-menu-pop button:hover {
  background: #33312e;
}

.profile-add-button {
  min-height: 52px;
  border: 1px solid #484848;
  border-radius: 8px;
  background: #080808;
  font-weight: 900;
  margin-top: 22px;
}

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(2px);
}

.profile-modal {
  width: min(100%, 520px);
  border-radius: 8px;
  background: #242321;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
  padding: 24px;
}

.profile-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.profile-field label {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.profile-field p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-field input,
.profile-field textarea {
  width: 100%;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #050505;
  color: #f6f6f6;
  outline: none;
}

.profile-field input {
  min-height: 46px;
  padding: 0 14px;
}

.profile-field textarea {
  min-height: 130px;
  padding: 14px;
  resize: vertical;
  line-height: 1.45;
}

.profile-counter {
  margin-top: -12px;
  margin-bottom: 12px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

.profile-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.profile-modal-actions .button {
  min-width: 70px;
}

.profile-empty {
  border: 1px solid #333;
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  background: #181818;
}
