.contacts_body,
.msg_card_body {
  border-top: .3px solid #e7e7ec8c;
  overflow-y: auto
}

.chat,
.user_info {
  margin-top: auto;
  margin-bottom: auto
}

body,
html {
  height: 100%;
  margin: 0;
  background: #7f7fd5;
  background: -webkit-linear-gradient(to right, #91eae4, #86a8e7, #7f7fd5);
  background: linear-gradient(to right, #91eae4, #86a8e7, #7f7fd5)
}

.card {
  height: calc(100vh - 40px);
  border-radius: 15px !important;
  background-color: rgba(0, 0, 0, .4) !important
}

.contacts_body {
  padding: .75rem !important;
  white-space: nowrap
}

.card-header {
  border-radius: 15px 15px 0 0 !important;
  border-bottom: 0 !important
}

.card-footer {
  border-radius: 0 0 15px 15px !important;
  border-top: 0 !important
}

.search,
.type_msg {
  border: 0 !important;
  background-color: rgba(0, 0, 0, .3) !important;
  color: #fff !important
}

.container {
  align-content: center
}

.search:focus,
.type_msg:focus {
  box-shadow: none !important;
  outline: 0 !important
}

.type_msg {
  height: 60px !important;
  overflow-y: auto
}

#send_msg {
  width: 100% !important;
  display: flex !important
}

.attach_btn {
  border-radius: 15px 0 0 15px !important;
  background-color: rgba(0, 0, 0, .3) !important;
  border: 0 !important;
  color: #fff !important;
  cursor: pointer
}

.menu_btn,
.search_btn,
.send_btn {
  border-radius: 0 15px 15px 0 !important;
  background-color: rgba(0, 0, 0, .3) !important;
  border: 0 !important;
  color: #fff !important;
  cursor: pointer
}

.logout_menu {
  background-color: rgba(0, 0, 0, .3) !important;
  border: 0 !important;
  color: #fff !important;
  cursor: pointer;
  border-radius: 15px;
  margin-left: 10px;
  padding: 10px
}

.menu_btn {
  border-radius: 15px 0 0 15px !important
}

.contacts {
  list-style: none;
  padding: 0
}

.contacts li {
  width: 100% !important;
  padding: 5px 10px;
  margin-bottom: 15px !important
}

.contacts li:hover {
  background-color: rgba(0, 0, 0, .3);
  border-radius: 11px
}

.user_img,
.user_img_msg {
  border: 1.5px solid #f5f6fa
}

.user_img {
  height: 55px;
  width: 55px
}

.user_img_msg {
  height: 40px;
  width: 40px
}

.img_cont {
  position: relative;
  height: 55px;
  width: 55px
}

.img_cont_msg {
  height: 40px;
  width: 40px
}

.online_icon {
  position: absolute;
  height: 15px;
  width: 15px;
  background-color: #4cd137;
  border-radius: 50%;
  bottom: .2em;
  right: .4em;
  border: 1.5px solid #fff
}

.action_menu ul li,
.action_menu_user ul li {
  margin-bottom: 5px;
  border-radius: 11px;
  width: 100%
}

.offline {
  background-color: #c23616 !important
}

.user_info {
  margin-left: 15px
}

.user_info span {
  font-size: 17px;
  color: #fff
}

.user_info p {
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px
}

.video_cam {
  margin-left: 50px;
  margin-top: 5px
}

.msg_cotainer,
.msg_cotainer_send {
  margin-top: auto;
  margin-bottom: auto;
  border-radius: 20px;
  padding: 12px 16px;
  position: relative;
  max-width: 75%;
  word-wrap: break-word;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.video_cam span {
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  margin-right: 20px
}

.msg_cotainer {
  margin-left: 10px;
  background: var(--msg-incoming-bg, linear-gradient(135deg, rgba(30, 27, 75, 0.9) 0%, rgba(49, 46, 129, 0.85) 100%));
  border: 1px solid var(--msg-incoming-border, rgba(99, 102, 241, 0.2));
  color: var(--msg-incoming-text, #e2e8f0);
  box-shadow: var(--msg-incoming-shadow, 0 4px 15px rgba(0, 0, 0, 0.15));
}

.msg_cotainer_send {
  margin-right: 10px;
  background: var(--msg-outgoing-bg, linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%));
  border: 1px solid var(--msg-outgoing-border, rgba(139, 92, 246, 0.3));
  color: var(--msg-outgoing-text, #ffffff);
  box-shadow: var(--msg-outgoing-shadow, 0 4px 20px rgba(99, 102, 241, 0.25));
}

.action_menu,
.action_menu_user {
  padding: 5px;
  background-color: rgba(0, 0, 0, .5);
  border-radius: 15px;
  display: none
}

.msg_time,
.msg_time_send {
  position: absolute;
  bottom: -15px;
  color: rgba(255, 255, 255, .5);
  font-size: 10px
}

.msg_time {
  left: 0
}

.msg_time_send {
  right: 0
}

.msg_head,
.relative-container {
  position: relative
}

#action_menu_btn,
#action_menu_btn_user {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #fff;
  cursor: pointer;
  font-size: 20px
}

.relative-container ul li {
  display: flex;
  align-items: center;
  justify-content: start
}

.action_menu {
  z-index: 1;
  position: absolute;
  color: #fff;
  top: -5px
}

#sender .action_menu {
  left: 15px
}

#receiver .action_menu {
  right: 15px
}

.action_menu_user {
  z-index: 100;
  position: absolute;
  color: #fff;
  top: 22px;
  right: 22px;
  font-size: 17px;
  width: calc(100% - 100px);
  max-width: 300px
}

.action_menu_user ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%
}

.action_menu_user ul li {
  padding: 10px 15px
}

.action_menu_user ul li i {
  padding-right: 10px
}

.action_menu ul li:hover,
.action_menu_user ul li:hover {
  cursor: pointer;
  background-color: rgba(0, 0, 0, .2)
}

.action_menu ul li {
  padding: 10px 90px 10px 15px
}

@media(max-width:576px) {
  .contacts_card {
    margin-bottom: 15px !important
  }
}

.custom-file-input:lang(ru)~.custom-file-label::after {
  content: "Обзор"
}

.message_count {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center
}

.chat-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto
}

.chat-item-actions .message_count {
  margin-left: 0
}

.chat-delete-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, .6);
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s, color .2s
}

.chat-delete-btn:hover {
  background-color: rgba(255, 255, 255, .15);
  color: #ff6b6b
}

.chat-delete-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .3)
}

.chat-delete-btn i {
  pointer-events: none
}

.badge {
  font-size: 12px !important;
  padding: 5px 9px !important;
  border-radius: 50px !important
}

.no-messages-container {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #888
}

.no-messages-container i {
  font-size: 4.5rem;
  color: #aaa;
  margin-bottom: 15px
}

.no-messages-container .no-messages {
  font-size: 18px;
  font-weight: 600
}

.blocked-message {
  background: linear-gradient(145deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, .1);
  width: calc(100% - 40px);
  margin: 20px auto;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  transition: transform .3s, box-shadow .3s
}

.blocked-message:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15)
}

.blocked-message i {
  color: #721c24;
  font-size: 28px;
  margin-right: 15px
}

.blocked-message p {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .5px
}

.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem
}

/* Не даём колонкам съезжать при сворачивании левого меню */
.app-layout {
  flex-wrap: nowrap
}

.app-layout>.left-widget,
.app-layout>.chat,
.app-layout>.desktop-chat-panel {
  min-width: 0
}

@media(max-width:991.98px) {
  .app-layout {
    flex-wrap: wrap
  }
}

@media(min-width:992px) {
  .news-sidebar {
    margin-top: 0;
    padding-left: 15px
  }
}

.news-widget {
  background-color: rgba(0, 0, 0, .35);
  border-radius: 18px;
  padding: 1.25rem;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2)
}

.news-widget__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #fff
}

.news-widget__title i {
  font-size: 1.1rem;
  color: #ffd166
}

.news-widget__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem
}

.news-widget__item {
  background-color: rgba(0, 0, 0, .28);
  border-radius: 14px;
  padding: .75rem;
  color: rgba(255, 255, 255, .88);
  font-size: .9rem;
  line-height: 1.45
}

.news-widget__tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-bottom: .45rem
}

.news-widget__tag--info {
  background: rgba(64, 156, 255, .18);
  color: #68b3ff
}

.news-widget__tag--success {
  background: rgba(36, 197, 116, .18);
  color: #48d597
}

.news-widget__tag--warning {
  background: rgba(255, 179, 0, .22);
  color: #ffcb52
}

.news-widget__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: -.15rem 0 0
}

.news-chip {
  background-color: rgba(0, 0, 0, .32);
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .85rem;
  color: #fff;
  transition: background-color .2s ease, transform .2s ease
}

.news-chip:hover {
  background-color: rgba(0, 0, 0, .5);
  transform: translateY(-1px)
}

@media(max-width:991.98px) {
  .news-sidebar {
    margin-top: 1.5rem
  }
}

.left-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem
}

@media(min-width:992px) {
  .left-sidebar {
    margin-top: 0;
    margin-bottom: 0;
    padding-right: 15px
  }
}

.left-widget {
  position: relative;
  background-color: rgba(0, 0, 0, .35);
  border-radius: 18px;
  padding: 1.25rem;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  transition: flex-basis .3s ease, max-width .3s ease, padding .3s ease;
  overflow: visible
}

.left-widget__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.1rem;
  margin-bottom: .75rem;
  color: #fff
}

.left-widget__title i {
  font-size: 1.1rem;
  color: #76c7ff
}

.left-widget__description {
  font-size: .9rem;
  color: rgba(255, 255, 255, .75);
  margin-bottom: .85rem;
  line-height: 1.4
}

.left-widget__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .65rem
}

.left-widget__item {
  display: flex;
  align-items: center;
  gap: .75rem;
  background-color: rgba(0, 0, 0, .28);
  border-radius: 14px;
  padding: .6rem .85rem;
  color: #fff;
  font-size: .9rem
}

.left-widget__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #76c7ff
}

.left-actions {
  display: grid;
  gap: .65rem
}

.left-actions__user {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: rgba(0, 0, 0, .36);
  border-radius: 12px;
  padding: .7rem 1rem;
  font-size: .95rem;
  font-weight: 600;
  color: #fff
}

.left-actions__user i {
  color: #76c7ff
}

.left-actions__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .25);
  background: rgba(0, 0, 0, .35);
  flex-shrink: 0
}

.left-actions__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover
}

.left-actions__name {
  display: block;
  line-height: 1.2
}

.left-action-btn {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: rgba(0, 0, 0, .32);
  border: 0;
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 12px;
  text-align: left;
  font-size: .9rem;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease
}

a.left-action-btn {
  text-decoration: none;
  width: 100%
}

a.left-action-btn:hover,
a.left-action-btn:focus {
  color: #fff;
  text-decoration: none
}

.left-action-btn i {
  color: #ffd166
}

.left-action-btn:hover:not(:disabled):not(.disabled) {
  background: rgba(0, 0, 0, .48);
  transform: translateY(-1px)
}

.left-action-btn.disabled,
.left-action-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(0, 0, 0, .2)
}

.left-action-btn.disabled i,
.left-action-btn:disabled i {
  color: #666
}

.left-widget__inner {
  transition: opacity .25s ease
}

.left-widget__collapse-toggle {
  position: absolute;
  top: .6rem;
  right: -.6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(9, 14, 22, .9);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  z-index: 5;
  transition: background-color .2s ease, box-shadow .2s ease, transform .3s ease
}

.left-widget__collapse-toggle:hover {
  background: rgba(9, 14, 22, 1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35)
}

.left-widget__collapse-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12)
}

.left-widget__collapse-icon i {
  color: #fff;
  font-size: .75rem;
  transition: transform .3s ease
}

.left-widget__collapse-text {
  font-size: .8rem;
  letter-spacing: .03em
}

.left-widget--collapsed {
  padding: .75rem .25rem
}

.left-widget--collapsed .left-widget__inner {
  display: none
}

.chat-preview__back {
  display: none;
  align-items: center;
  gap: .4rem;
  background: rgba(255, 255, 255, .08);
  border: 0;
  color: #f8fafc;
  font-size: .85rem;
  font-weight: 600;
  padding: .45rem .85rem .45rem .6rem;
  border-radius: 999px;
  line-height: 1;
  min-height: 38px;
  margin-right: 12px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  flex-shrink: 0;
  letter-spacing: .01em
}

.chat-preview__back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .35);
  color: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08)
}

.chat-preview__back-label {
  white-space: nowrap
}

.chat-preview__back:hover,
.chat-preview__back:focus {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  transform: translateX(-1px);
  outline: none
}

@media(max-width:768px) {
  .chat-preview__back {
    display: inline-flex
  }
}

.left-widget--collapsed .left-widget__collapse-icon i {
  transform: rotate(180deg)
}

.left-widget--collapsed .left-widget__collapse-toggle {
  right: -1.5rem
}

@media(max-width:991.98px) {
  .left-widget__collapse-toggle {
    position: relative;
    right: auto;
    top: auto;
    margin-left: auto;
    margin-bottom: .5rem
  }

  .left-widget--collapsed {
    padding: 0
  }

  .left-widget--collapsed .left-widget__collapse-toggle {
    right: auto
  }
}

@media(min-width:992px) {
  .left-widget--collapsed {
    flex: 0 0 76px;
    max-width: 76px;
    padding: .75rem .35rem;
    margin-right: 0
  }

  .left-widget--collapsed .left-widget__inner {
    display: block
  }

  .left-widget--collapsed .left-actions__user {
    justify-content: center;
    padding: .55rem;
    gap: 0
  }

  .left-widget--collapsed .left-actions__name,
  .left-widget--collapsed .left-actions__badge {
    display: none
  }

  .left-widget--collapsed .left-action-btn {
    justify-content: center;
    padding: .75rem;
    gap: 0;
    position: relative
  }

  .left-widget--collapsed .left-action-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
  }

  .left-widget--collapsed .left-action-btn .badge {
    position: absolute;
    top: 6px;
    right: 8px;
    margin-left: 0 !important
  }

  .left-widget--collapsed+.chat {
    flex: 1 1 auto;
    max-width: none
  }
}

@media(max-width:991.98px) {

  .left-sidebar,
  .news-sidebar {
    margin-top: 1.5rem
  }
}





.news-widget__tag--danger {
  background: rgba(255, 82, 82, .18);
  color: #ff9aa2
}

.news-widget__tag--neutral {
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .8)
}

.news-widget__item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .4rem;
  gap: .75rem
}

.news-widget__date {
  font-size: .75rem;
  color: rgba(255, 255, 255, .55)
}

.news-widget__headline {
  margin: 0 0 .45rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff
}

.news-widget__text {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: .9rem;
  line-height: 1.45
}

.news-widget__empty {
  margin: 0;
  color: rgba(255, 255, 255, .65);
  font-size: .88rem
}

.wallet-balance-modal .modal-content {
  background: rgba(9, 14, 22, .95);
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .55)
}

.wallet-balance-modal .modal-header {
  border: 0;
  padding: 1.4rem 1.6rem 0
}

.wallet-balance-modal__body {
  padding: 0 1.6rem 1.8rem;
  text-align: center
}

.wallet-balance-modal__label {
  margin-bottom: .35rem;
  color: rgba(255, 255, 255, .65);
  letter-spacing: .08em;
  font-size: .85rem;
  text-transform: uppercase
}

.wallet-balance-modal__amount {
  font-size: 2.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .3rem
}

.wallet-balance-modal__currency {
  font-size: 1.15rem;
  margin-left: .25rem;
  color: #7bdaff;
  font-weight: 600
}

.wallet-balance-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
  margin: 1rem 0 1.25rem
}

.wallet-action-btn {
  border: 0;
  border-radius: 999px;
  padding: .55rem 1.4rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  color: #fff
}

.wallet-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35)
}

.wallet-action-btn--primary {
  background: linear-gradient(135deg, #5cc9ff, #8b6cff)
}

.contacts-section {
  margin-bottom: 1.5rem
}

.contacts-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .65rem
}

.contacts-section__title {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, .75)
}

.contacts-section__title i {
  font-size: .9rem;
  color: rgba(148, 163, 184, .9)
}

.contacts-section__action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(96, 165, 250, .12);
  border: 1px solid rgba(96, 165, 250, .35);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease
}

.contacts-section__action:hover {
  background: rgba(96, 165, 250, .22);
  border-color: rgba(125, 211, 252, .6);
  transform: translateY(-1px)
}

.contacts-section__action i {
  font-size: .8rem
}

.contacts-section__action--disabled,
.contacts-section__action:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: rgba(148, 163, 184, .18);
  border-color: rgba(148, 163, 184, .35);
  color: rgba(226, 232, 240, .65)
}

.contacts-empty {
  display: none;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(15, 23, 42, .45);
  color: rgba(226, 232, 240, .75);
  font-size: .9rem;
  text-align: center
}

.chat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .9rem
}

.chat-list__item {
  width: 100%
}

.chat-list .contact-item,
.chat-list .group-item {
  margin-bottom: 0 !important
}

.groups-list {
  display: flex;
  flex-direction: column;
  gap: .85rem
}

.group-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .75rem 1rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, .65);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 16px 36px rgba(2, 6, 23, .45);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease
}

.group-item:hover {
  background: rgba(15, 23, 42, .8);
  border-color: rgba(96, 165, 250, .45);
  transform: translateY(-1px)
}

.group-item.active {
  background: rgba(59, 130, 246, .18);
  border-color: rgba(59, 130, 246, .85);
  box-shadow: 0 18px 40px rgba(37, 99, 235, .45)
}

.group-item__avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05)
}

.group-item__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff
}

.group-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem
}

.group-item__name {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  color: #fff
}

.group-item__meta {
  font-size: .78rem;
  color: rgba(226, 232, 240, .68);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center
}

.group-item__meta-dot {
  opacity: .5
}

.group-item__badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, .16);
  border: 1px solid rgba(148, 163, 184, .35);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, .85)
}

.group-item__description {
  margin: 0;
  font-size: .78rem;
  color: rgba(226, 232, 240, .55)
}

.unread-badge {
  background: #ef4444;
  color: #fff;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(239, 68, 68, .4)
}

.wallet-action-btn--secondary {
  background: rgba(255, 255, 255, .08)
}

.wallet-action-btn--accent {
  background: linear-gradient(135deg, #ff7a18, #ffb347)
}

.wallet-action-btn--secondary:hover {
  background: rgba(255, 255, 255, .18)
}

.wallet-balance-modal__note {
  margin: 0;
  color: rgba(255, 255, 255, .55);
  font-size: .9rem
}

/* ===== Create Group Modal (unify design) ===== */
#createGroupModal .modal-content {
  background: rgba(9, 14, 22, .95);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 1.25rem;
  box-shadow: 0 24px 55px -10px rgba(0, 0, 0, .55);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column
}

#createGroupModal .modal-header {
  border: 0;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, rgba(96, 165, 250, .15), rgba(127, 127, 213, .18));
  display: flex;
  align-items: center;
  gap: .85rem
}

#createGroupModal .modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .6rem;
  letter-spacing: .03em;
  color: #fff
}

#createGroupModal .modal-title i {
  color: #60a5fa;
  font-size: 1.1rem
}

#createGroupModal .close {
  background: rgba(255, 255, 255, .08);
  border: 0;
  color: #e2e8f0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease, transform .2s ease
}

#createGroupModal .close:hover {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  transform: rotate(90deg)
}

#createGroupModal .modal-body {
  padding: 1.2rem 1.4rem 1rem;
  color: #f8fafc;
  font-size: .92rem
}

#createGroupModal .create-group-modal__intro {
  margin: 0 0 .9rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .06);
  padding: .85rem 1rem;
  border-radius: 16px;
  font-size: .8rem;
  line-height: 1.35;
  color: rgba(248, 250, 252, .72)
}

#createGroupModal .form-group {
  margin-bottom: .95rem
}

#createGroupModal label {
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, .65);
  margin-bottom: .4rem
}

#createGroupModal input.form-control,
#createGroupModal textarea.form-control {
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  border-radius: 14px;
  padding: .7rem .95rem;
  font-size: .9rem;
  transition: border .2s ease, box-shadow .2s ease, background .2s ease
}

#createGroupModal input.form-control:focus,
#createGroupModal textarea.form-control:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .35);
  background: rgba(0, 0, 0, .45)
}

#createGroupModal textarea.form-control {
  resize: vertical;
  min-height: 70px
}

#createGroupModal .modal-footer {
  border: 0;
  padding: 0 1.4rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem
}

#createGroupModal .modal-footer .btn {
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .7rem 1.25rem;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem
}

#createGroupModal .modal-footer .btn-primary {
  background: linear-gradient(135deg, #60a5fa, #6366f1);
  border: 0;
  box-shadow: 0 12px 32px rgba(79, 70, 229, .45);
  color: #fff
}

#createGroupModal .modal-footer .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(79, 70, 229, .55)
}

#createGroupModal .modal-footer .btn-outline-secondary {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff
}

#createGroupModal .modal-footer .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, .18)
}

#createGroupModal .create-group-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .6rem;
  padding: .4rem .4rem .6rem;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  min-height: 60px
}

#createGroupModal .create-group-members--loading {
  display: flex;
  align-items: center;
  justify-content: center
}

#createGroupModal .form-check {
  position: relative;
  margin: 0;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  padding: .55rem .7rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease
}

#createGroupModal .form-check:hover {
  background: rgba(255, 255, 255, .12)
}

#createGroupModal .form-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none
}

#createGroupModal .form-check-label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .75rem;
  color: #f8fafc
}

#createGroupModal .form-check-label strong {
  font-size: .78rem;
  line-height: 1;
  color: #fff;
  font-weight: 600
}

#createGroupModal .form-check-label .group-meta {
  font-size: .68rem;
  color: rgba(226, 232, 240, .75);
  line-height: 1.1
}

#createGroupModal .form-check-input:checked+.form-check-label {
  background: linear-gradient(135deg, rgba(96, 165, 250, .35), rgba(99, 102, 241, .4));
  border-radius: 10px;
  padding: .4rem .55rem;
  margin: -.4rem -.55rem .4rem -.55rem;
  box-shadow: 0 6px 16px rgba(30, 58, 138, .45)
}

#createGroupModal small.form-text {
  color: rgba(248, 250, 252, .55) !important;
  font-size: .7rem;
  margin-top: .35rem
}

@media (max-width:575.98px) {
  #createGroupModal .modal-content {
    border-radius: 1rem
  }

  #createGroupModal .modal-header {
    padding: 1rem 1.1rem
  }

  #createGroupModal .modal-body {
    padding: 1rem 1.1rem .85rem
  }

  #createGroupModal .modal-title {
    font-size: 1rem
  }

  #createGroupModal .create-group-modal__intro {
    font-size: .72rem;
    padding: .7rem .8rem;
    border-radius: 12px
  }

  #createGroupModal input.form-control,
  #createGroupModal textarea.form-control {
    padding: .6rem .8rem;
    font-size: .85rem;
    border-radius: 12px
  }

  #createGroupModal .create-group-members {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .5rem;
    padding: .35rem .35rem .55rem
  }

  #createGroupModal .form-check {
    padding: .5rem .6rem;
    border-radius: 10px
  }

  #createGroupModal .form-check-label strong {
    font-size: .72rem
  }

  #createGroupModal .form-check-label .group-meta {
    font-size: .62rem
  }

  #createGroupModal .modal-footer {
    padding: 0 1.1rem 1.1rem
  }

  #createGroupModal .modal-footer .btn {
    padding: .6rem 1rem;
    font-size: .8rem
  }
}




.chat-preview {
  background: rgba(0, 0, 0, .4);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 1.25rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 360px;
  height: 100%;
  color: #f8fafc
}

.chat-preview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem
}

.chat-preview__titles {
  flex: 1;
  min-width: 0
}

.chat-preview__subtitle {
  margin: 0 0 .2rem;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, .62)
}

.chat-preview__title {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
  font-weight: 600
}

.chat-preview__close {
  background: rgba(255, 255, 255, .05);
  border: 0;
  color: #e2e8f0;
  font-size: 1rem;
  padding: .4rem;
  border-radius: 999px;
  line-height: 1;
  transition: background .2s ease, color .2s ease, transform .2s ease
}

.chat-preview__close:hover,
.chat-preview__close:focus {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  transform: scale(1.05);
  outline: none
}

.chat-preview__body {
  flex: 1;
  max-height: 520px;
  overflow-y: auto;
  padding-right: .25rem;
  margin-right: -.25rem
}

.chat-preview__body::-webkit-scrollbar {
  width: 6px
}

.chat-preview__body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .08);
  border-radius: 999px
}

.chat-preview__body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .65);
  border-radius: 999px
}

.chat-preview__placeholder {
  margin: 0;
  text-align: center;
  color: rgba(226, 232, 240, .75);
  font-size: .9rem
}

.chat-preview__message {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: .9rem;
  margin-bottom: .85rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35)
}

.chat-preview__message--own {
  background: linear-gradient(135deg, rgba(96, 165, 250, .4), rgba(14, 165, 233, .45));
  border-color: rgba(125, 211, 252, .6);
  margin-left: 26px
}

.chat-preview__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .72rem;
  color: rgba(226, 232, 240, .7);
  gap: .5rem;
  margin-bottom: .35rem
}

.chat-preview__author {
  font-weight: 600;
  color: #fff
}

.chat-preview__edited,
.message-edited {
  margin-left: .4rem;
  font-size: .72rem;
  color: rgba(226, 232, 240, .7)
}

.chat-preview__meta time,
.message-time,
.msg_time_send {
  display: inline-flex;
  align-items: center;
  gap: .35rem
}

.chat-preview__text {
  margin: 0;
  color: #f8fafc;
  word-break: break-word
}

.chat-preview__form textarea {
  resize: none;
  min-height: 78px;
  margin-bottom: .55rem;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  color: #f8fafc;
  padding: .65rem .85rem;
  transition: border .2s ease, box-shadow .2s ease, background .2s ease
}

.chat-preview__form textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .35);
  outline: none;
  background: rgba(0, 0, 0, .45)
}

.chat-preview__submit {
  width: 100%;
  border: 0;
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .7rem;
  background: linear-gradient(135deg, #60a5fa, #6366f1);
  color: #fff;
  box-shadow: 0 15px 35px rgba(37, 99, 235, .45);
  transition: transform .2s ease, box-shadow .2s ease
}

.chat-preview__submit:disabled {
  cursor: not-allowed;
  opacity: .6;
  box-shadow: none
}

.chat-preview__submit:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, .55)
}

@media(max-width:991.98px) {
  .chat-preview {
    margin-top: 1.5rem
  }
}

.chat-preview--empty .chat-preview__header {
  display: none
}

.chat-preview--empty .chat-preview__body {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-right: 0;
  margin-right: 0
}

.chat-preview--empty .chat-preview__placeholder {
  font-size: 1rem;
  color: rgba(248, 250, 252, .85)
}

.chat-preview--empty .chat-preview__form {
  display: none !important
}


.chat-preview__message--context {
  border-color: rgba(96, 165, 250, .8);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .45), 0 12px 30px rgba(15, 23, 42, .65)
}

.chat-preview__context-menu {
  position: fixed;
  z-index: 999;
  background: #0b1627;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  min-width: 220px;
  padding: .35rem 0;
  box-shadow: 0 30px 60px rgba(2, 6, 23, .7);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .2s ease;
  pointer-events: none
}

.chat-preview__context-menu--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto
}

.chat-preview__context-action {
  width: 100%;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem 1.1rem;
  font-size: .92rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease
}

.chat-preview__context-action:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff
}

.chat-preview__context-icon {
  width: 1.3rem;
  display: flex;
  justify-content: center;
  color: inherit;
  font-size: .95rem
}

.chat-preview__context-label {
  flex: 1;
  text-align: left
}

.chat-preview__context-action[disabled],
.chat-preview__context-action:disabled {
  opacity: .45;
  cursor: not-allowed;
  color: rgba(226, 232, 240, .6)
}

.chat-preview__context-action:disabled:hover {
  background: transparent;
  color: rgba(226, 232, 240, .6)
}

.chat-scroll-button {
  position: absolute;
  right: 12px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: rgba(8, 11, 20, .82);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 6
}

.chat-scroll-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-2px)
}

.chat-scroll-button:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .85);
  outline-offset: 3px
}

.chat-preview__pinned {
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 18px;
  padding: .75rem 1rem;
  margin-bottom: .9rem;
  box-shadow: 0 14px 35px rgba(2, 6, 23, .45);
  transition: border .2s ease, box-shadow .2s ease;
  cursor: pointer
}

.chat-preview__pinned[hidden] {
  display: none !important
}

.chat-preview__pinned:hover {
  border-color: rgba(96, 165, 250, .65);
  box-shadow: 0 18px 40px rgba(30, 64, 175, .45)
}

.chat-preview__pinned-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .4rem
}

.chat-preview__pinned-info {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: #e2e8f0
}

.chat-preview__pinned-icon {
  color: #fbbf24;
  font-size: 1rem
}

.chat-preview__pinned-meta {
  display: flex;
  flex-direction: column;
  gap: .1rem
}

.chat-preview__pinned-context {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: rgba(226, 232, 240, .72)
}

.chat-preview__pinned-dot {
  opacity: .6
}

.chat-preview__pinned-author {
  font-weight: 600;
  color: #fff
}

.chat-preview__pinned-time {
  font-size: .75rem;
  color: rgba(226, 232, 240, .75)
}

.chat-preview__pinned-text {
  margin: 0;
  color: #e2e8f0;
  font-size: .92rem;
  line-height: 1.4
}

.chat-preview__pinned-remove {
  border: 0;
  background: rgba(15, 23, 42, .65);
  color: rgba(226, 232, 240, .7);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease
}

.chat-preview__pinned-remove:hover {
  background: rgba(248, 250, 252, .12);
  color: #fff
}

.wallet-cell {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums
}

.wallet-cell__currency {
  font-size: .8rem;
  color: rgba(255, 255, 255, .65)
}

#walletTransferModal .wallet-transfer-feedback {
  font-size: .9rem
}

.left-actions__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: .15rem .65rem;
  background: rgba(118, 199, 255, .2);
  color: #cfe8ff;
  font-size: .75rem;
  font-weight: 600;
  margin-top: 4px
}

.left-actions__badge--hidden {
  display: none !important
}

.left-action-btn--activation {
  background: linear-gradient(135deg, rgba(118, 199, 255, .25), rgba(127, 127, 213, .3));
  border: 1px solid rgba(118, 199, 255, .35)
}

.left-action-btn--activation i {
  color: #76c7ff
}

.left-action-btn--pending {
  background: rgba(255, 193, 7, .18);
  border-color: rgba(255, 193, 7, .4)
}

.left-action-btn--rejected {
  background: rgba(255, 99, 132, .2);
  border-color: rgba(255, 99, 132, .45)
}

.left-action-btn--hidden {
  display: none !important
}

.activation-modal .modal-body {
  padding: 1.75rem
}

.activation-modal .activation-note {
  color: #ffc107;
  font-size: .85rem
}

/* Separator resizer between sidebar and chat (visible drag handle) */
.chat-separator-resizer {
  position: absolute;
  top: 0;
  width: 12px;
  height: 100%;
  cursor: ew-resize;
  z-index: 30;
  background: rgba(255, 255, 255, .02);
  transition: background .12s ease
}

.chat-separator-resizer:hover {
  background: rgba(255, 255, 255, .06)
}

.chat-separator-resizer:before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 40px;
  background: rgba(255, 255, 255, .12);
  border-radius: 2px
}

.chat-preview--resizing {
  transition: none !important
}

.chat-preview--resizing+.chat {
  transition: none !important
}

/* Left separator resizer */
.left-separator-resizer {
  position: absolute;
  top: 0;
  width: 12px;
  height: 100%;
  cursor: ew-resize;
  z-index: 30;
  background: rgba(255, 255, 255, .02);
  transition: background .12s ease
}

.left-separator-resizer:hover {
  background: rgba(255, 255, 255, .06)
}

.left-separator-resizer:before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 40px;
  background: rgba(255, 255, 255, .12);
  border-radius: 2px
}

.left-widget--resizing {
  transition: none !important
}

/* Right-side resizer (handle between .chat and .news-sidebar) */
.chat-right-resizer {
  position: absolute;
  top: 0;
  width: 12px;
  height: 100%;
  cursor: ew-resize;
  z-index: 30;
  background: rgba(255, 255, 255, .02);
  transition: background .12s ease
}

.chat-right-resizer:hover {
  background: rgba(255, 255, 255, .06)
}

.chat-right-resizer:before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 40px;
  background: rgba(255, 255, 255, .12);
  border-radius: 2px
}

.chat--resizing {
  transition: none !important
}

.chat-preview {
  position: relative
}

@media(max-width:768px) {
  .chat-scroll-button {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    right: 10px;
    width: 40px;
    height: 40px
  }
}

/* ===== Activation Instruction Block ===== */
.activation-instruction {
  background: rgba(96, 165, 250, .08);
  border: 1px solid rgba(96, 165, 250, .25);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  transition: all .2s ease
}

.activation-instruction:hover {
  background: rgba(96, 165, 250, .12);
  border-color: rgba(96, 165, 250, .35)
}

.activation-instruction__header {
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  user-select: none
}

.activation-instruction__header i {
  color: #60a5fa;
  font-size: 1.1rem
}

.activation-instruction__header h6 {
  margin: 0;
  flex: 1;
  font-size: .95rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: .02em
}

.activation-instruction__toggle {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease
}

.activation-instruction__toggle:hover {
  background: rgba(255, 255, 255, .15)
}

.activation-instruction__toggle i {
  color: #e2e8f0;
  font-size: .85rem;
  transition: transform .3s ease
}

.activation-instruction__toggle.active i {
  transform: rotate(180deg)
}

.activation-instruction__content {
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  animation: fadeInDown .3s ease
}

.activation-instruction__text {
  color: rgba(226, 232, 240, .85);
  font-size: .88rem;
  line-height: 1.6;
  white-space: pre-wrap
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@media (max-width:575.98px) {
  .activation-instruction {
    padding: .85rem 1rem;
    border-radius: 14px
  }

  .activation-instruction__header h6 {
    font-size: .85rem
  }

  .activation-instruction__toggle {
    width: 28px;
    height: 28px
  }

  .activation-instruction__text {
    font-size: .8rem
  }
}

/* ===== Activation Modal Buttons ===== */
.activation-modal .modal-header {
  background: linear-gradient(135deg, rgba(96, 165, 250, .12), rgba(99, 102, 241, .15));
  border: 0;
  border-radius: 1rem 1rem 0 0;
  padding: 1.2rem 1.4rem
}

.activation-modal .modal-title {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: .6rem
}

.activation-modal .modal-content {
  background: #1e2238;
  border: 1px solid rgba(96, 165, 250, .2);
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5)
}

.activation-modal .modal-body {
  padding: 1.4rem 1.6rem
}

.activation-modal .form-control {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #e2e8f0;
  border-radius: 12px;
  padding: .65rem .95rem;
  font-size: .92rem;
  transition: all .2s ease
}

.activation-modal .form-control:focus {
  background: rgba(255, 255, 255, .08);
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .15);
  color: #fff
}

.activation-modal .form-control::placeholder {
  color: rgba(226, 232, 240, .4)
}

.activation-modal label {
  color: #e2e8f0;
  font-weight: 500;
  font-size: .9rem;
  margin-bottom: .5rem;
  display: block
}

.activation-modal .form-text {
  color: rgba(203, 213, 225, .65);
  font-size: .82rem;
  margin-top: .4rem
}

.activation-modal .text-muted {
  color: rgba(203, 213, 225, .7) !important;
  font-size: .88rem
}

.activation-modal .btn-primary {
  background: linear-gradient(135deg, #60a5fa, #6366f1);
  border: 0;
  border-radius: 12px;
  padding: .65rem 1.5rem;
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .02em;
  box-shadow: 0 12px 28px rgba(79, 70, 229, .4);
  transition: transform .2s ease, box-shadow .2s ease
}

.activation-modal .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(79, 70, 229, .5);
  background: linear-gradient(135deg, #5b9fe5, #5a5ee0)
}

.activation-modal .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .35)
}

.activation-modal .btn-primary:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none
}

.activation-modal .btn-primary .spinner-border {
  width: 1rem;
  height: 1rem;
  margin-left: .5rem;
  vertical-align: middle
}

.activation-modal .btn-outline-secondary {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #cbd5e1;
  border-radius: 12px;
  padding: .65rem 1.35rem;
  font-weight: 500;
  font-size: .92rem;
  transition: all .2s ease
}

.activation-modal .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .25);
  color: #e2e8f0
}

.activation-modal .alert-info {
  background: rgba(96, 165, 250, .12);
  border: 1px solid rgba(96, 165, 250, .25);
  color: #bfdbfe;
  border-radius: 12px
}

.activation-modal .alert-danger {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .25);
  color: #fecaca;
  border-radius: 12px
}

.activation-modal .close {
  color: rgba(226, 232, 240, .7);
  opacity: 1;
  font-size: 1.4rem;
  font-weight: 300;
  text-shadow: none;
  transition: color .2s ease, transform .2s ease
}

.activation-modal .close:hover {
  color: #e2e8f0;
  transform: rotate(90deg)
}

.activation-modal .modal-title i {
  color: #60a5fa;
  font-size: 1.05rem
}

@media (max-width:575.98px) {
  .activation-modal .modal-body {
    padding: 1.2rem 1.3rem
  }

  .activation-modal .btn-primary,
  .activation-modal .btn-outline-secondary {
    padding: .6rem 1.2rem;
    font-size: .88rem
  }

  .activation-modal .modal-title {
    font-size: 1rem
  }
}

/* ===== Support Form Section ===== */
.support-section-divider {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--border-light);
}

.support-form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

.support-form-input,
.support-form-textarea {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--text-sm);
  transition: var(--transition-base);
}

.support-form-input:focus,
.support-form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--surface-3);
}

.support-form-textarea {
  line-height: 1.6;
  resize: vertical;
}

.support-char-count {
  display: block;
  margin-top: var(--spacing-xs);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.support-submit-btn {
  background: var(--gradient-button);
  padding: var(--spacing-md) var(--spacing-xl);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--surface-1);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  width: 100%;
  box-shadow: var(--shadow-btn-primary);
  transition: var(--transition-base);
}

.support-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.support-submit-btn:active {
  transform: translateY(0);
}

.support-refresh-btn {
  background: var(--surface-3);
  border: 1px solid var(--border-medium);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-xs);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  font-size: var(--text-xs);
  transition: var(--transition-base);
}

.support-refresh-btn:hover {
  background: var(--surface-4);
  border-color: var(--color-primary);
}

.support-messages-container {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--spacing-md);
}

/* ===== About Project Section ===== */
.about-project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.about-project-edit-btn {
  background: var(--gradient-button);
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-sm);
  color: var(--surface-1);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-btn-primary);
  transition: var(--transition-base);
}

.about-project-edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.about-project-edit-btn:active {
  transform: translateY(0);
}

.about-project-edit-btn-bottom {
  background: var(--gradient-button);
  border: none;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-sm);
  color: var(--surface-1);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  font-size: var(--text-sm);
  width: 100%;
  box-shadow: var(--shadow-btn-primary);
  transition: var(--transition-base);
}

.about-project-edit-btn-bottom:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.about-project-edit-btn-bottom:active {
  transform: translateY(0);
}

.about-project-content {
  white-space: pre-wrap;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-secondary);
  padding: var(--spacing-md);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: var(--spacing-md);
}

.about-project-cancel-btn {
  background: var(--surface-3);
  border: 1px solid var(--border-medium);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition-base);
}

.about-project-cancel-btn:hover {
  background: var(--surface-4);
  border-color: var(--border-strong);
}

/* ===== About Project Modal ===== */
.about-project-modal .modal-content {
  background: var(--gradient-modal);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
}

.about-project-modal .modal-header {
  border-bottom: 1px solid var(--border-light);
}

.about-project-modal .modal-title {
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.about-project-modal .close {
  color: var(--color-primary);
  opacity: 1;
}

.voice-message-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  border: none;
  color: #e8f0ff;
  width: 100%;
  max-width: 520px;
}

.voice-message-player.outgoing {
  background: transparent;
}

.voice-message-player .voice-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2d7bd9, #1e62b8);
  color: var(--text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 12px rgba(45, 123, 217, 0.35);
}

.voice-message-player .voice-play-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(45, 123, 217, 0.4);
}

.voice-message-player .voice-play-btn:active {
  transform: translateY(0);
}

.voice-message-player .voice-waveform {
  flex: 1;
  height: 32px;
  display: flex;
  align-items: center;
}

.voice-message-player .voice-progress {
  position: relative;
  width: 100%;
  height: 28px;
  border-radius: 8px;
  background: repeating-linear-gradient(to right,
      rgba(255, 255, 255, 0.12) 0,
      rgba(255, 255, 255, 0.12) 3px,
      transparent 3px,
      transparent 8px);
  overflow: hidden;
}

.voice-message-player .voice-progress-bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(45, 123, 217, 0.65), rgba(89, 183, 255, 0.8));
  box-shadow: 0 0 12px rgba(89, 183, 255, 0.25);
  transition: width 0.1s linear;
}

.voice-message-player .voice-time {
  min-width: 100px;
  text-align: right;
  font-size: 13px;
  color: #d1e1ff;
  opacity: 0.9;
}

/* Адаптивность для форм чата */
@media (max-width: 992px) {
  .chat-preview__form {
    padding: 0.5rem;
  }

  .chat-preview__form textarea {
    font-size: 14px !important;
    padding: 0.55rem 0.75rem !important;
  }
}

@media (max-width: 768px) {
  .chat-preview__form {
    padding: 0.4rem;
  }

  .chat-preview__form textarea {
    font-size: 13px !important;
    padding: 0.5rem 0.65rem !important;
  }

  /* Контейнеры сообщений */
  .msg_cotainer,
  .msg_cotainer_send {
    max-width: 85%;
    font-size: 14px;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .chat-preview__form textarea {
    font-size: 14px !important;
    /* Minimum 14px to prevent iOS auto-zoom */
    padding: 0.45rem 0.55rem !important;
  }

  /* Контейнеры сообщений на очень маленьких экранах */
  .msg_cotainer,
  .msg_cotainer_send {
    max-width: 90%;
    font-size: 14px;
    /* Increased from 13px for readability */
    padding: 8px 12px;
  }

  .msg_time,
  .msg_time_send {
    font-size: 10px;
    /* Slightly larger for readability */
  }
}

/* Chat layout: header + scrollable messages + fixed footer */
.chat .card {
  display: flex;
  flex-direction: column;
}

.chat .msg_head,
.chat .card-footer {
  flex-shrink: 0;
}

.chat .msg_card_body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

@media (min-width: 769px) {

  /* Правый чат-блок на всю высоту */
  .desktop-chat-panel {
    height: calc(100vh - 40px);
    min-height: 0;
  }

  .desktop-chat-panel .chat-preview {
    height: 100%;
  }
}

/* Keep sidebar chat input docked to the bottom of the panel */
@media (min-width: 769px) {
  .desktop-chat-panel {
    display: flex !important;
    flex-direction: column;
    align-self: stretch;
    height: 100vh;
    min-height: 0;
  }

  .desktop-chat-panel .chat-preview {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .desktop-chat-panel .chat-preview__body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none !important;
  }
}

#sidebarChatPanel,
#sidebarChatPanelDesktop {
  height: 100%;
  min-height: 0;
}

/* Desktop chat column: stretch and scroll messages inside */
@media (min-width: 769px) {
  #sidebarChatPanelDesktop {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
  }

  #sidebarChatPanelDesktop .chat-preview__body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
  }
}

#sidebarChatPanel .chat-preview__body,
#sidebarChatPanelDesktop .chat-preview__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

#sidebarChatPanel .chat-preview__form,
#sidebarChatPanelDesktop .chat-preview__form {
  margin-top: auto;
}