:root{
  --bg: #f3f5fb;
  --panel: #ffffff;
  --panel2:#f7f8fe;
  --text:#1b1f2a;
  --muted:#6f7382;
  --stroke: rgba(17,24,39,.10);

  --primary:#6d5efc;
  --primary2:#8a7bff;

  --shadow: 0 16px 36px rgba(17,24,39,.10);
  --shadow2: 0 10px 22px rgba(17,24,39,.08);

  --r-lg: 18px;
  --r-md: 14px;

  --side: 360px;
}

.mpAdmin{
  display:grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: calc(100vh - 0px);
  background: var(--bg);
}

.mpSide{
  background: #222836;
  color: #e9ecf6;
  padding: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.mpSide__head{
  padding: 10px 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mpSide__title{ font-weight: 900; font-size: 16px; }
.mpSide__sub{ margin-top: 4px; font-size: 12px; opacity: .75; font-weight: 800; }

.mpSearch{
  display:flex;
  align-items:center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  padding: 8px 10px;
}
.mpSearch input{
  width:100%;
  border:0;
  outline:none;
  background: transparent;
  color: #e9ecf6;
  font-weight: 800;
  font-size: 13px;
}
.mpSearch input::placeholder{ color: rgba(233,236,246,.65); }
.mpSearch button{
  border:0;
  background: transparent;
  color:#e9ecf6;
  cursor:pointer;
  opacity: .8;
  font-weight: 900;
}
.mpSearch button:hover{ opacity: 1; }

.mpList{
  overflow:auto;
  padding-right: 6px;
  scrollbar-width: none;
}
.mpList::-webkit-scrollbar{ display:none; }

.mpContact{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  text-decoration:none;
  color: inherit;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.04);
  margin-bottom: 10px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.mpContact:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.10);
}
.mpContact.is-active{
  background: rgba(109,94,252,.20);
  border-color: rgba(109,94,252,.25);
}

.mpAvatar{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.08);
  flex: 0 0 auto;
}
.mpAvatar--sm{
  width: 30px;
  height: 30px;
}

.mpContact__meta{ min-width:0; flex: 1; }
.mpContact__name{
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.mpContact__sub{
  margin-top: 2px;
  font-size: 12px;
  opacity: .75;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.mpChevron{ opacity: .6; font-weight: 900; }

/* MAIN */
.mpMain{
  padding: 18px 20px 20px;
  min-width:0;
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.mpTop{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}
.mpTop__title{ font-weight: 900; font-size: 14px; }
.mpTop__sub{ color: var(--muted); font-weight: 800; font-size: 12px; margin-top: 2px; }

.mpChat{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  flex: 1;
  min-height: 360px;
  overflow: hidden;
  display:flex;
}
.mpMsgs{
  width:100%;
  padding: 14px;
  overflow:auto;
}
.mpMsgs::-webkit-scrollbar{ height: 10px; width: 10px; }
.mpMsgs::-webkit-scrollbar-thumb{
  background: rgba(109,94,252,.22);
  border-radius: 999px;
}

.mpEmpty{
  margin:auto;
  text-align:center;
  padding: 22px;
  color: var(--muted);
}
.mpEmpty__icon{ font-size: 32px; }
.mpEmpty__title{ margin-top: 8px; font-weight: 900; color: var(--text); }
.mpEmpty__sub{ margin-top: 4px; font-weight: 800; }

.mpMsgRow{
  display:flex;
  align-items:flex-end;
  gap: 10px;
  margin: 10px 0;
}
.mpMsgRow.is-their{ justify-content:flex-start; }
.mpMsgRow.is-mine{ justify-content:flex-end; }

.mpBubble{
  max-width: min(680px, 78%);
  border-radius: 16px;
  border: 1px solid rgba(17,24,39,.10);
  background: var(--panel2);
  padding: 10px 12px;
}
.mpMsgRow.is-mine .mpBubble{
  background: linear-gradient(135deg, rgba(109,94,252,.15), rgba(138,123,255,.12));
  border-color: rgba(109,94,252,.18);
}

.mpBubble__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.mpBubble__name{ font-weight: 900; font-size: 12px; }
.mpBubble__date{ color: var(--muted); font-weight: 800; font-size: 11px; }
.mpBubble__txt{ font-weight: 700; font-size: 13px; line-height: 1.35; }

.mpMineBadge{
  font-weight: 900;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(109,94,252,.12);
  border: 1px solid rgba(109,94,252,.18);
  color: var(--primary);
}

/* composer */
.mpComposer{
  background: transparent;
}
.mpForm{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 12px;
}
.mpForm textarea{
  width:100%;
  resize:none;
  min-height: 44px;
  border: 1px solid rgba(17,24,39,.10);
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 13px;
  outline:none;
}
.mpForm textarea:focus{
  border-color: rgba(109,94,252,.40);
  box-shadow: 0 0 0 4px rgba(109,94,252,.12);
}
.mpForm__actions{
  margin-top: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.mpSend{
  border:0;
  cursor:pointer;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 14px 26px rgba(109,94,252,.25);
}

/* Responsive */
@media (max-width: 980px){
  .mpAdmin{
    grid-template-columns: 1fr;
  }
  .mpSide{
    position: relative;
    height: auto;
  }
}
