
/* Premium Messenger look & feel */
#messenger-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(100%, 940px);
  max-width: 940px;
  transform: translateX(100%);
  transition: transform .28s ease;
  display: grid;
  grid-template-columns: 320px 1fr;
  background: #0b0c10;
  color: #e6e6e6;
  z-index: 9999;
  box-shadow: -12px 0 24px rgba(0,0,0,.45);
}
body.messenger-open #messenger-panel { transform: translateX(0); }

.msgr-sidebar {
  border-right: 1px solid rgba(255,255,255,.08);
  background: #111218;
  display: grid;
  grid-template-rows: auto auto 1fr;
}
.msgr-header { padding: 16px; font-weight: 700; font-size: 18px; }
.msgr-search { padding: 8px 12px; }
.msgr-search input { width: 100%; padding: 10px 12px; background: #0d0e13; border: 1px solid #2a2d39; border-radius: 10px; color: #e6e6e6; }

.msgr-convos { overflow-y: auto; }
.msgr-convo { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 16px; cursor: pointer; align-items: center; }
.msgr-convo:hover { background: rgba(255,255,255,.04); }
.msgr-convo.active { background: rgba(255,255,255,.08); }
.msgr-convo .avatar { width: 40px; height: 40px; border-radius: 12px; background: #1c1f2a; display: grid; place-items: center; font-weight: 700; }
.msgr-convo .meta .name { font-weight: 600; }
.msgr-convo .meta .preview { opacity: .7; font-size: 12px; }

.msgr-chat { display: grid; grid-template-rows: auto 1fr auto; }
.msgr-chat-header { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 600; }
.msgr-messages { padding: 18px; overflow-y: auto; display: grid; gap: 8px; background: linear-gradient(180deg,#0b0c10,#0b0c10 60%,#0e1116); }
.msgr-msg { display: flex; }
.msgr-msg.me { justify-content: flex-end; }
.msgr-msg .bubble { max-width: 70%; padding: 10px 14px; border-radius: 18px; }
.msgr-msg.me .bubble { background: #4461f2; color: white; border-bottom-right-radius: 6px; }
.msgr-msg.them .bubble { background: #1a1f2e; color: #e6e6e6; border-bottom-left-radius: 6px; }
.msgr-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.msgr-input input { padding: 12px 14px; background: #0d0e13; border: 1px solid #2a2d39; border-radius: 14px; color: #e6e6e6; }
.msgr-input button { padding: 10px 16px; border-radius: 12px; background: #4461f2; color: #fff; border: none; cursor: pointer; }

.msgr-nav-icon { position: relative; display: inline-flex; align-items: center; }
.msgr-icon { font-size: 18px; }
.msgr-badge {
  position: absolute; top: -6px; right: -6px;
  background: #e53935; color: #fff; border-radius: 999px;
  min-width: 18px; height: 18px; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
}


/* Per-conversation unread badge */
.msgr-convo { position: relative; }
.msgr-convo .badge {
  position: absolute; right: 12px; top: 14px;
  background: #e53935; color: #fff; border-radius: 999px;
  min-width: 18px; height: 18px; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* Typing indicator (header hint already styled inline) */
