/* assets/app.css */
html, body {
  height: 100%;
  background: #f6f7f9;
}
.cv-root {
  height: 100vh;
  display: flex;
}
.cv-sidebar {
  width: 340px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}
.cv-chatlist {
  overflow: auto;
  flex: 1;
}
.cv-chatitem {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f5;
}
.cv-chatitem:hover {
  background: #f8f9fa;
}
.cv-chatitem.active {
  background: #eef2ff;
}
.cv-chatname {
  font-weight: 600;
  font-size: 14px;
}
.cv-chatsub {
  font-size: 12px;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cv-header {
  background: #fff;
}
.cv-messages {
  flex: 1;
  overflow: auto;
  padding: 16px;
}
.cv-empty {
  text-align: center;
  margin-top: 24px;
}
.msg-row {
  display: flex;
  margin-bottom: 10px;
}
.msg-row.me {
  justify-content: flex-end;
}
.msg-bubble {
  max-width: 72%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e9ecef;
  position: relative;
}
.msg-row.me .msg-bubble {
  background: #dcf8c6;
  border-color: #cfeec0;
}
.msg-meta {
  font-size: 11px;
  color: #6c757d;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.msg-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}
.msg-deleted {
  font-style: italic;
  color: #6c757d;
}
.msg-media img {
  max-width: 300px;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}
.msg-quoted {
  border-left: 3px solid rgba(0, 0, 0, .15);
  padding-left: 10px;
  margin-bottom: 8px;
  color: #6c757d;
  font-size: 12px;
}
/* VCARD */
.vcard-card {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8f9fa;
  margin-top: 6px;
}
.vcard-title {
  font-weight: 700;
  font-size: 14px;
}
.vcard-sub {
  font-size: 12px;
  color: #6c757d;
}
.vcard-row {
  margin-top: 6px;
  font-size: 12px;
}
.vcard-label {
  font-weight: 700;
  color: #495057;
  margin-right: 6px;
}
/* Reactions */
.msg-reactbar {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.msg-react {
  font-size: 12px;
  background: rgba(0, 0, 0, .06);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 999px;
  padding: 2px 8px;
}
/* Sticker menor */
.msg-media img.msg-sticker {
  max-width: 160px;
  width: auto;
}
/* Remove padding da bolha quando for VCARD (fica tipo card “colado”) */
.msg-bubble.msg-bubble-vcard {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}
/* Card de VCARD estilo WhatsApp */
.vcard-wa {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
}
.vcard-wa-head {
  background: #0b5d4b; /* verde estilo WhatsApp */
  color: #fff;
  display: flex;
  align-items: center;
  padding: 10px 12px;
}
.vcard-wa-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vcard-wa-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vcard-wa-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.vcard-wa-name {
  font-weight: 700;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vcard-wa-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: .95;
  flex: 0 0 auto;
}
.vcard-wa-time {
  font-size: 12px;
}
.vcard-wa-ticks {
  font-size: 12px;
  letter-spacing: -1px;
  opacity: .95;
}
/* Corpo */
.vcard-wa-body {
  padding: 10px 12px;
}
.vcard-wa-sub {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 6px;
}
.vcard-wa-lines {
  display: grid;
  gap: 4px;
}
.vcard-wa-line {
  font-size: 13px;
  color: #212529;
}
.msg-bubble.msg-bubble-vcard .msg-body {
  white-space: normal;
  padding: 0;
}
.msg-bubble.msg-bubble-vcard .msg-meta {
  display: none;
}
.msg-media img.msg-sticker {
  max-width: 140px;
  width: auto;
  border: none !important;
  background: transparent;
}