/* =========================================================
   Chat & Online Widget — Glassmorphic Redesign
   ========================================================= */

.pbg_chat_split {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.pbg_chat_split .pbg_online_widget {
  flex: 0 0 300px;
  width: 300px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.pbg_chat_split .pbg_chat {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 991px) {
  .pbg_chat_split {
    flex-direction: column;
  }

  .pbg_chat_split .pbg_online_widget {
    width: 100%;
    flex: 1 1 auto;
  }
}

.pbg_moder_panel_btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Плашка забаненного пользователя */
.pbg_chat_banned {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 107, 96, 0.08);
  border: 1px solid rgba(255, 107, 96, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-top: 14px;
}

.pbg_chat_banned__icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 17px;
  color: #08150f;
  background: linear-gradient(135deg, #ff6b60 0%, #c4382e 100%);
  box-shadow: 0 0 12px rgba(255, 107, 96, 0.35);
}

.pbg_chat_banned__text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  gap: 1px;
}

.pbg_chat_banned__title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ff6b60;
}

.pbg_chat_banned__reason,
.pbg_chat_banned__until {
  font-size: 11px;
  color: #aeb6d2;
}

/* Закрепленное сообщение */
.pbg_chat_pinned {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(79, 234, 159, 0.08);
  border: 1px solid rgba(79, 234, 159, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 12px;
}

.pbg_chat_pinned.disp-n {
  display: none;
}

.pbg_chat_pinned__icon {
  font-size: 16px;
  color: #4fea9f;
  flex: 0 0 auto;
  transform: rotate(20deg);
  filter: drop-shadow(0 0 6px rgba(79, 234, 159, 0.5));
}

.pbg_chat_pinned__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.35;
  gap: 1px;
}

.pbg_chat_pinned__login {
  font-size: 11px;
  font-weight: 800;
  color: #4fea9f;
}

.pbg_chat_pinned__text {
  font-size: 12px;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pbg_chat_pinned__unpin {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #4fea9f;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pbg_chat_pinned__unpin:hover {
  background: rgba(79, 234, 159, 0.2);
  color: #fff;
}

/* Правила чата */
.pbg_chat_rules {
  margin: 0;
  padding-left: 20px;
  color: #aeb6d2;
  font-size: 13px;
  line-height: 1.6;
}

.pbg_chat_rules li {
  margin-bottom: 8px;
}

.pbg_chat_rules li::marker {
  color: #4fea9f;
  font-weight: 800;
}

/* Авторизация для отправки */
#chat .auth-to-write {
  height: auto;
  margin: 14px 0 18px;
  line-height: normal;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

#chat .auth-to-write span.d-none {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: #aeb6d2;
  font-size: 12.5px;
  font-weight: 600;
}

#chat .auth-to-write .chat_icon {
  position: relative;
  top: 0;
  left: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #08150f;
  box-shadow: 0 0 10px rgba(79, 234, 159, 0.35);
}

/* Основной блок чата */
.pbg_chat {
  border-radius: var(--auth-radius, 20px);
  padding: 20px;
  padding-bottom: 0px;
  background: rgba(18, 20, 29, 0.40) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  margin-bottom: 25px;
}

.pbg_chat .heading_block_chat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pbg_chat .flex_heading_chat {
  display: flex;
  align-items: center;
  gap: 13px;
}

.pbg_chat .flex_heading_chat i {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-size: 19px;
  color: #08150f;
  background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
  box-shadow: 0 0 15px rgba(79, 234, 159, 0.35);
}

.pbg_chat .heading_chat_info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.pbg_chat .heading_chat_info span {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.pbg_chat .heading_chat_info text {
  font-size: 11px;
  color: #707893;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pbg_chat .double_btns_chat {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Кнопка непрочитанных сообщений */
.pbg_chat_unread {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
  color: #08150f;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 4px 15px rgba(79, 234, 159, 0.35);
  animation: pbgUnreadPop .3s ease;
}

.pbg_chat_unread.is-visible {
  display: inline-flex;
}

.pbg_chat_unread:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 234, 159, 0.5);
}

.pbg_chat_unread i {
  font-size: 14px;
}

@keyframes pbgUnreadPop {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Спикер сообщений */
#chat #chat_messages {
  position: relative;
  height: 570px !important;
  scroll-behavior: smooth;
  padding: 4px 6px 4px 2px !important;
}

#chat #chat_messages::-webkit-scrollbar {
  width: 4px;
}

#chat #chat_messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

#chat #chat_messages .chat_message,
#chat #messages .chat_message {
  position: relative;
  overflow: visible;
  display: block;
  padding: 0;
  margin-bottom: 10px;
  animation: pbgMsgIn .25s ease;
}

#chat #chat_messages .chat_message .message,
#chat #messages .chat_message .message {
  width: 100%;
  float: none;
  position: relative;
  right: auto;
  font-size: 14px;
  line-height: 1.45;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 14px;
  display: block;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#chat #chat_messages .chat_message .message:hover,
#chat #messages .chat_message .message:hover {
  background: rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.1);
}

#chat #chat_messages .chat_message .message .info,
#chat #messages .chat_message .message .info {
  display: none;
}

#chat #chat_messages .chat_message > a,
#chat #messages .chat_message > a {
  display: none;
}

#chat #chat_messages .chat_message .message .with_code,
#chat #messages .chat_message .message .with_code {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 100%;
  width: 100%;
  margin-top: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.45;
  color: #aeb6d2;
}

#chat #chat_messages .chat_message .message .with_code > .back_img_chat,
#chat #messages .chat_message .message .with_code > .back_img_chat {
  display: block;
  flex: 0 0 auto;
  width: 38px;
}

#chat #chat_messages .chat_message .message .with_code > .back_img_chat img,
#chat #messages .chat_message .message .with_code > .back_img_chat img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

#chat #chat_messages .chat_message .message .with_code .message_global,
#chat #messages .chat_message .message .with_code .message_global {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

#chat .message_global {
  display: block;
  max-width: 100%;
}

#chat .login_share_flex {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: relative;
  overflow: visible;
  margin-bottom: 4px;
}

#chat .avatar_login {
  flex: 0 1 auto;
  min-width: 0;
}

#chat .interaction_mess {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 10px;
}

#chat .interaction_mess .share_login {
  display: none;
  font-size: 11px;
  color: #707893;
  cursor: pointer;
  transition: color 0.2s ease;
}

#chat .with_code:hover .interaction_mess .share_login {
  display: inline-flex;
}

#chat .interaction_mess .share_login:hover {
  color: #ffffff;
}

#chat .text_chat {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

#chat .text_chat img.thumbnail-img {
  max-width: 220px;
  width: 100%;
  border-radius: 10px;
  margin-top: 6px;
}

@keyframes pbgMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Индикатор печати */
.pbg_chat_typing {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 2px 7px 8px;
  padding: 7px 14px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #aeb6d2;
  font-size: 11px;
  font-weight: 600;
  animation: pbgTypingIn .2s ease;
}

.pbg_chat_typing.is-visible {
  display: flex;
}

@keyframes pbgTypingIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.pbg_chat_typing__dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.pbg_chat_typing__dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4fea9f;
  box-shadow: 0 0 6px rgba(79, 234, 159, 0.6);
  display: block;
  animation: pbgTypingBounce 1.2s infinite ease-in-out;
}

.pbg_chat_typing__dots i:nth-child(2) { animation-delay: .15s; }
.pbg_chat_typing__dots i:nth-child(3) { animation-delay: .3s; }

@keyframes pbgTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Меню управления сообщением */
#chat .avatar_login {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pbg_chat_manage {
  cursor: pointer;
  color: #707893;
  font-size: 13px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.pbg_chat_manage:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.pbg_chat_menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 190px;
  background: rgba(18, 20, 29, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 6px;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.pbg_chat_menu.is-visible {
  display: flex;
}

.pbg_chat_menu span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #aeb6d2;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.pbg_chat_menu span:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.pbg_chat_menu span i {
  font-size: 14px;
}

.pbg_moder_badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
  color: #08150f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .4px;
  box-shadow: 0 0 10px rgba(79, 234, 159, 0.35);
  white-space: nowrap;
}

/* Поле редактирования сообщения */
.pbg_chat_edit_box {
  margin-top: 6px;
}

.pbg_chat_edit_box textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12.5px;
  padding: 9px 12px;
}

.pbg_chat_edit_box textarea:focus {
  outline: none;
  border-color: #4fea9f;
  box-shadow: 0 0 10px rgba(79, 234, 159, 0.2);
}

.pbg_chat_edit_actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.pbg_chat_edit_save,
.pbg_chat_edit_cancel {
  border: none;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.pbg_chat_edit_save {
  background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
  color: #08150f;
  box-shadow: 0 4px 12px rgba(79, 234, 159, 0.3);
}

.pbg_chat_edit_save:hover {
  box-shadow: 0 6px 16px rgba(79, 234, 159, 0.45);
  transform: translateY(-1px);
}

.pbg_chat_edit_cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #aeb6d2;
}

.pbg_chat_edit_cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* =========================================================
   Sidebar Online Widget
   ========================================================= */

.pbg_online_widget {
  border-radius: var(--auth-radius, 20px);
  background: rgba(18, 20, 29, 0.68) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 16px;
  margin-bottom: 20px;
}

.pbg_online_widget__head {
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 12px;
  position: relative;
}

.pbg_online_widget__head-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  color: #aeb6d2;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pbg_online_widget__head-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  color: #707893;
  font-size: 11px;
  font-weight: 700;
}

.pbg_online_widget__title {
  font-size: 12px;
  color: #ffffff;
  font-weight: 800;
}

.pbg_online_widget__subtitle {
  color: #707893;
}

.pbg_online_widget__counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(79, 234, 159, 0.3);
  white-space: nowrap;
}

.pbg_online_widget__counter b {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: #4fea9f;
  text-shadow: 0 0 8px rgba(79, 234, 159, 0.35);
}

.pbg_online_widget__live {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: #4fea9f;
  box-shadow: 0 0 10px rgba(79, 234, 159, 0.8);
  animation: pbgLivePulse 1.8s infinite;
}

@keyframes pbgLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 234, 159, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(79, 234, 159, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 234, 159, 0); }
}

.pbg_online_widget__scroll_wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 60px;
  display: flex;
  flex-direction: column;
}

.pbg_online_widget__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pbg_online_widget__scroll::-webkit-scrollbar {
  width: 4px;
}

.pbg_online_widget__scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.pbg_online_widget__scroll .users_chat_online {
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.pbg_online_widget__scroll .users_chat_online:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(79, 234, 159, 0.25) !important;
}

.pbg_online_widget__scroll .visit_users_online {
  padding: 7px 10px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.pbg_online_widget__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  z-index: 1;
  display: block;
  width: 100%;
  background: linear-gradient(360deg, rgba(18, 20, 29, 0.95) 20%, transparent 100%);
  pointer-events: none;
}

.pbg_online_widget__visitors {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0 12px;
  height: 52px;
  margin-top: 8px;
  flex: 0 0 auto;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pbg_online_widget__visitors:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(79, 234, 159, 0.25);
}

.pbg_online_widget__visitors-info {
  display: flex;
  align-items: center;
  gap: 11px;
}

.pbg_online_widget__visitors-info i {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  color: #aeb6d2;
  background: rgba(255, 255, 255, 0.05);
}

.pbg_online_widget__count {
  background: rgba(255, 255, 255, 0.08);
  height: 30px;
  min-width: 30px;
  padding: 0 10px;
  color: #aeb6d2;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.pbg_online_widget__visitors:hover .pbg_online_widget__count {
  background: #4fea9f;
  color: #08150f;
  box-shadow: 0 0 10px rgba(79, 234, 159, 0.4);
}

@media (max-width: 991px) {
  #chat #chat_messages {
    height: 320px !important;
  }
}

@media (max-width: 575px) {
  .pbg_chat_unread b {
    display: inline;
  }
}

/* Модальное окно бана в меню сообщений */
.pbg_chat_ban_box.disp-n {
  display: none;
}

.pbg_chat_ban_box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 11px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}

.pbg_chat_ban_box label {
  font-size: 10.5px;
  color: #707893;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.pbg_chat_ban_date,
.pbg_chat_ban_reason {
  height: 32px !important;
  min-height: 32px !important;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  color: #fff !important;
}

.pbg_chat_ban_date::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: .8;
  cursor: pointer;
}

.pbg_chat_ban_actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.pbg_chat_ban_actions .pbg_chat_edit_save,
.pbg_chat_ban_actions .pbg_chat_edit_cancel {
  flex: 1 1 auto;
  padding: 6px 10px;
}

/* =========================================================
   Moderator Panel — Drawer
   ========================================================= */

body.pbg_moder_panel_open {
  overflow: hidden;
}

.pbg_moder_overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 14, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  transition: opacity .25s ease;
}

.pbg_moder_overlay.is-visible {
  display: block;
  opacity: 1;
}

.pbg_moder_panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 420px;
  max-width: 100vw;
  background: rgba(18, 20, 29, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pbg_moder_panel.is-open {
  transform: translateX(0);
}

.pbg_moder_panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pbg_moder_panel__title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pbg_moder_panel__title i {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 19px;
  color: #08150f;
  background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
  box-shadow: 0 0 15px rgba(79, 234, 159, 0.35);
}

.pbg_moder_panel__title-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.pbg_moder_panel__title-text span {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.pbg_moder_panel__title-text text {
  font-size: 11px;
  color: #707893;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pbg_moder_panel__close {
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #aeb6d2;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pbg_moder_panel__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pbg_moder_panel__tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.pbg_moder_tab {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #aeb6d2;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pbg_moder_tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pbg_moder_tab.is-active {
  background: linear-gradient(135deg, #4fea9f 0%, #22b877 100%);
  color: #08150f;
  border-color: #4fea9f;
  box-shadow: 0 0 12px rgba(79, 234, 159, 0.35);
}

.pbg_moder_panel__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
}

.pbg_moder_panel__body::-webkit-scrollbar {
  width: 4px;
}

.pbg_moder_panel__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.pbg_moder_tab_panel {
  display: none;
}

.pbg_moder_tab_panel.is-active {
  display: block;
}

.pbg_moder_loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
}

.pbg_moder_empty {
  text-align: center;
  color: #707893;
  font-size: 12.5px;
  padding: 30px 10px;
}

.pbg_moder_list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pbg_moder_row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pbg_moder_row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.pbg_moder_row__info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
  flex: 1 1 auto;
}

.pbg_moder_row__login {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pbg_moder_row__login:hover {
  color: #4fea9f;
}

.pbg_moder_row__sub {
  font-size: 10.5px;
  color: #707893;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pbg_moder_row__action {
  flex: 0 0 auto;
  border: none;
  background: rgba(79, 234, 159, 0.15);
  color: #4fea9f;
  font-size: 11px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pbg_moder_row__action:hover {
  background: rgba(79, 234, 159, 0.3);
  color: #fff;
}

.pbg_moder_deleted_item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.pbg_moder_deleted_item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.pbg_moder_deleted_item__author {
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
}

.pbg_moder_deleted_item__date {
  color: #707893;
  font-size: 10.5px;
}

.pbg_moder_deleted_item__text {
  color: #aeb6d2;
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-word;
  margin-bottom: 6px;
}

.pbg_moder_deleted_item__foot {
  color: #707893;
  font-size: 10.5px;
}

.pbg_moder_rules_edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pbg_moder_rules_edit textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #fff;
  font-size: 12.5px;
  padding: 12px;
  resize: vertical;
}

.pbg_moder_rules_edit textarea:focus {
  outline: none;
  border-color: #4fea9f;
}

.pbg_moder_rules_actions {
  display: flex;
  justify-content: flex-end;
}

.pbg_moder_tab_toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pbg_moder_danger_btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(79, 234, 159, 0.3);
  background: rgba(79, 234, 159, 0.12);
  color: #4fea9f;
  font-size: 11.5px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pbg_moder_danger_btn i {
  font-size: 15px;
}

.pbg_moder_danger_btn:hover {
  background: rgba(79, 234, 159, 0.25);
  border-color: rgba(79, 234, 159, 0.5);
  color: #fff;
}

@media (max-width: 575px) {
  .pbg_moder_panel {
    width: 100%;
  }

  .pbg_moder_panel__tabs {
    flex-wrap: wrap;
  }

  .pbg_moder_tab {
    flex: 1 1 45%;
  }
}

/* =========================================================
   Visitors Panel — 4-Column Grid
   ========================================================= */

.pbg_visitors_overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 14, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  transition: opacity .25s ease;
}

.pbg_visitors_overlay.is-visible {
  display: block;
  opacity: 1;
}

.pbg_visitors_panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 460px;
  max-width: 100vw;
  background: rgba(18, 20, 29, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pbg_visitors_panel.is-open {
  transform: translateX(0);
}

.pbg_visitors_grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.pbg_visitors_card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 100px;
  padding: 12px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.pbg_visitors_card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(79, 234, 159, 0.3);
  transform: translateY(-2px);
}

.pbg_visitors_card__avatar {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: rgba(0, 0, 0, 0.2);
  flex: 0 0 auto;
}

.pbg_visitors_card__avatar--icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #707893;
  background: rgba(255, 255, 255, 0.05);
}

.pbg_visitors_card__login {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pbg_visitors_card__login--muted {
  color: #707893;
  font-weight: 600;
}

.pbg_visitors_card--guest {
  cursor: default;
}

@media (max-width: 575px) {
  .pbg_visitors_panel {
    width: 100%;
  }

  .pbg_visitors_grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Фиксы верстки чата */
.chat_block.pbg_chat_split {
  padding-bottom: 17px;
}

.pbg_chat_split .pbg_online_widget,
.pbg_chat_split .pbg_chat {
  min-width: 0;
  margin-bottom: 0;
}

#chat #chat_messages {
  box-sizing: border-box;
  overflow-x: hidden;
  padding-left: 6px !important;
}

#chat #chat_messages .chat_message,
#chat #chat_messages .message,
#chat #chat_messages .with_code,
#chat #chat_messages .message_global,
#chat #chat_messages .text_chat {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

#chat #chat_messages .message {
  left: auto !important;
  right: auto !important;
  margin-left: 0 !important;
}

#chat #chat_messages .text_chat {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 991px) {
  .chat_block.pbg_chat_split {
    gap: 12px;
    padding-bottom: 12px;
  }
}