.message-center-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid #e3e5e9;
  border-radius: 14px;
  color: #34363d;
  background: #fff;
  cursor: pointer;
}
.message-center-trigger:hover,
.message-center-trigger:focus-visible { border-color: #ef233c; color: #d71938; outline: none; }
.message-center-trigger svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.message-center-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #ef233c;
  font-size: 11px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
}
.message-center-dialog {
  width: min(980px, calc(100vw - 36px));
  height: min(760px, calc(100dvh - 36px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: #34363d;
  background: #fff;
  box-shadow: 0 30px 90px rgba(22, 24, 30, .24);
  overflow: hidden;
}
.message-center-dialog::backdrop { background: rgba(20, 22, 28, .46); backdrop-filter: blur(3px); }
.message-center-shell { display: flex; flex-direction: column; height: 100%; }
.message-center-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; border-bottom: 1px solid #e9eaed; }
.message-center-head .eyebrow { margin: 0 0 4px; color: #d71938; }
.message-center-head h2 { margin: 0; font-size: 27px; line-height: 1.1; }
.message-center-close { width: 42px; height: 42px; border: 0; border-radius: 13px; color: #4d5159; background: #f1f2f4; font-size: 26px; cursor: pointer; }
.message-center-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); flex: 1; min-height: 0; }
.message-center-sidebar { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid #e9eaed; background: #fbfbfc; }
.message-center-search { position: relative; display: block; margin: 16px; }
.message-center-search svg { position: absolute; top: 50%; left: 14px; width: 19px; height: 19px; transform: translateY(-50%); fill: none; stroke: #8a8f99; stroke-width: 1.8; }
.message-center-search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid #dfe1e5; border-radius: 14px; background: #fff; font: inherit; }
.message-center-search input:focus { border-color: #e42643; outline: 3px solid rgba(228, 38, 67, .1); }
.message-center-directory { flex: 1; overflow: auto; padding: 0 8px 18px; }
.message-contact {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 10px;
  border: 0;
  border-radius: 15px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.message-contact:hover, .message-contact.is-active { background: #fff0f2; }
.message-avatar { display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 15px; color: #9c1830; background: #ffe2e6; font-size: 14px; font-weight: 850; }
.message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.message-contact__copy { min-width: 0; }
.message-contact__copy strong, .message-contact__copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-contact__copy strong { margin-bottom: 3px; font-size: 14px; }
.message-contact__copy span { color: #7b8089; font-size: 12px; }
.message-contact__badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; color: #fff; background: #ef233c; font-size: 11px; font-weight: 800; line-height: 24px; text-align: center; }
.message-center-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.message-thread-empty { display: grid; place-items: center; flex: 1; padding: 36px; text-align: center; }
.message-thread-empty span { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 25px; color: #c91331; background: #fff0f2; font-size: 30px; }
.message-thread-empty strong { display: block; margin-bottom: 8px; font-size: 20px; }
.message-thread-empty p { max-width: 340px; margin: 0; color: #7b8089; line-height: 1.5; }
.message-thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.message-thread-head { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 20px; border-bottom: 1px solid #eceef1; }
.message-thread-back { display: none; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #f2f3f5; font-size: 20px; cursor: pointer; }
.message-thread-head__copy { min-width: 0; }
.message-thread-head__copy strong, .message-thread-head__copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-thread-head__copy small { margin-top: 3px; color: #777d87; }
.message-thread-list { flex: 1; overflow: auto; padding: 22px; background: linear-gradient(180deg, #fafafa, #fff); }
.message-bubble-row { display: flex; margin: 8px 0; }
.message-bubble-row.is-mine { justify-content: flex-end; }
.message-bubble { max-width: min(78%, 520px); padding: 11px 14px 8px; border-radius: 17px 17px 17px 5px; background: #f0f1f3; }
.message-bubble-row.is-mine .message-bubble { border-radius: 17px 17px 5px 17px; color: #fff; background: #d71938; }
.message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.message-bubble time { display: block; margin-top: 5px; color: #8a8f98; font-size: 10px; text-align: right; }
.message-bubble-row.is-mine time { color: rgba(255,255,255,.76); }
.message-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid #eceef1; }
.message-compose textarea { min-height: 46px; max-height: 120px; resize: none; padding: 12px 14px; border: 1px solid #dfe1e5; border-radius: 15px; font: inherit; line-height: 1.35; }
.message-compose textarea:focus { border-color: #e42643; outline: 3px solid rgba(228, 38, 67, .1); }
.message-compose button { min-width: 116px; height: 46px; border: 0; border-radius: 15px; color: #fff; background: #ef233c; font-weight: 800; cursor: pointer; }
.message-compose button:disabled { background: #b6bac1; cursor: default; }
.message-compose-status { grid-column: 1 / -1; min-height: 18px; margin: 0; color: #bd1832; font-size: 13px; }
.message-center-empty-list { padding: 28px 18px; color: #7b8089; text-align: center; line-height: 1.5; }
@media (max-width: 760px) {
  .message-center-trigger { width: 40px; height: 40px; flex-basis: 40px; border-radius: 12px; }
  .message-center-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
  .message-center-head { padding: 17px 18px; }
  .message-center-head h2 { font-size: 23px; }
  .message-center-layout { grid-template-columns: 1fr; }
  .message-center-sidebar { border-right: 0; }
  .message-center-main { display: none; }
  .message-center-layout.has-active-thread .message-center-sidebar { display: none; }
  .message-center-layout.has-active-thread .message-center-main { display: flex; }
  .message-thread-back { display: block; }
  .message-thread-list { padding: 16px 12px; }
  .message-compose { padding: 10px 10px 14px; }
  .message-compose button { min-width: 92px; }
}
