
.messages-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
}

.dm-sidebar {
  align-self: start;
}

.soft-line {
  border: 0;
  border-top: 1px solid var(--line-2);
  margin: 14px 0;
}

.dm-chat,
.chirpy-chat {
  min-height: 620px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.dm-chat__head {
  min-height: 72px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255, 250, 252, .78);
}

.dm-peer,
.dm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dm-peer small,
.dm-row small {
  display: block;
  color: var(--muted);
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-row {
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  text-align: left;
}

.dm-row:hover,
.dm-row.is-active {
  background: var(--card-2);
  border-color: #edbdd3;
}

.dm-messages {
  min-height: 0;
  padding: 16px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  background:
    radial-gradient(circle at 0 0, rgba(239,0,138,.08), transparent 18rem),
    #fff;
}

.dm-message {
  max-width: min(75%, 560px);
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: #fff5fa;
  color: var(--text);
  line-height: 1.45;
}

.dm-message.is-me {
  justify-self: end;
  color: #fff;
  background: var(--pink);
  border-color: var(--pink);
}

.dm-message small {
  display: block;
  margin-top: 5px;
  opacity: .72;
  font-weight: 800;
}

.dm-compose {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  border-top: 1px solid var(--line-2);
  background: rgba(255,250,252,.78);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Badges de mensajes recibidos */
.dm-row__main {
  min-width: 0;
  flex: 1 1 auto;
}

.dm-count-badge,
.nav-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--pink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(239, 0, 138, .22);
}

.dm-count-badge {
  margin-left: auto;
  flex: 0 0 auto;
}

.nav-number-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}
