/* ============================================================
   Messages (recados) — composer + list
   ============================================================ */
.msg-field {
  margin-bottom: 14px;
  position: relative;
}
.msg-field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--purple-500);
  margin-bottom: 8px;
  font-weight: 800;
}
.msg-field input,
.msg-field textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-md);
  border: 2px solid rgba(92,30,140,0.18);
  background: white;
  color: var(--purple-900);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
  font-family: inherit;
}
.msg-field input:focus,
.msg-field textarea:focus {
  border-color: var(--purple-600);
  box-shadow: 0 0 0 4px rgba(92,30,140,0.12);
}
.msg-field textarea { min-height: 120px; line-height: 1.5; }
.msg-counter {
  position: absolute;
  right: 12px; bottom: -18px;
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 700;
}

.recipient-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.recipient-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--purple-50);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: border-color .15s, background .15s, transform .12s;
}
.recipient-pill:hover { border-color: rgba(92,30,140,0.18); }
.recipient-pill--active {
  background: white;
  border-color: var(--purple-600);
  box-shadow: 0 4px 0 rgba(92,30,140,0.15);
}
.recipient-pill__ic {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.08);
}
.recipient-pill__name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--purple-700);
  font-size: 14px;
  line-height: 1.15;
}
.recipient-pill__count {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 700;
  margin-top: 2px;
}

/* Preview */
.msg-preview {
  background: var(--purple-50);
  border-radius: var(--r-lg);
  padding: 20px;
  border: 2px dashed rgba(92,30,140,0.18);
}
.msg-preview__head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.msg-preview__author {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--purple-700);
  font-size: 15px;
}
.msg-preview__meta {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 700;
  display: flex;
  align-items: center;
}
.msg-preview__title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--purple-900);
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.2;
}
.msg-preview__body {
  color: var(--purple-900);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-wrap;
}
.msg-preview__placeholder {
  color: rgba(92,30,140,0.4);
  font-style: italic;
  font-size: 14px;
  font-weight: 700;
}

/* Sent list */
.msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: white;
  border: 2px solid rgba(92,30,140,0.08);
  position: relative;
}
.msg-item--pinned {
  border-color: var(--yellow-500);
  background: #FFFEF8;
}
.msg-item--pinned::before {
  content:"";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--yellow-500);
  border-radius: 5px 0 0 5px;
}
.msg-item__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 6px;
}
.msg-item__title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--purple-700);
  font-size: 16px;
  line-height: 1.2;
}
.msg-item__date {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.msg-item__meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.msg-item__body {
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-wrap;
}
.msg-item__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
