/* ============================================================
 * MessagesV2 · Shell + Conversation List + User Detail
 * ============================================================ */

.msgs-v2-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #f7f9fc;
  overflow: hidden;
  /* Requested split after reducing conversation list by 5 points:
     left 30% | center 40% | right 30% */
  --msgs-v2-left-col: 30%;
  /* main-area is 70% (center+right), so inside it:
     center = 40/70 = 57.1428571%
     right  = 30/70 = 42.8571429% */
  --msgs-v2-chat-col-in-main: 57.1428571%;
  --msgs-v2-right-col-in-main: 42.8571429%;
}

.msgs-v2-columns {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.msgs-v2-list-col {
  flex: 0 0 var(--msgs-v2-left-col);
  width: var(--msgs-v2-left-col);
  min-width: var(--msgs-v2-left-col);
  max-width: var(--msgs-v2-left-col);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #FAFAFC;
  border-right: 1px solid #e4e9f2;
}

#msgs-v2-chat-view,
.msgs-v2-main-area {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.msgs-v2-main-row {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.msgs-v2-chat-inner {
  flex: 0 0 var(--msgs-v2-chat-col-in-main);
  width: var(--msgs-v2-chat-col-in-main);
  min-width: var(--msgs-v2-chat-col-in-main);
  max-width: var(--msgs-v2-chat-col-in-main);
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e4e9f2;
  background: #ffffff;
}

.msgs-v2-chat-inner .message-detail-layout,
.msgs-v2-chat-inner .chat-block.chat-block-v2-footer {
  height: 100% !important;
  min-height: 0 !important;
}

.msgs-v2-detail-inner {
  flex: 0 0 var(--msgs-v2-right-col-in-main);
  width: var(--msgs-v2-right-col-in-main);
  min-width: var(--msgs-v2-right-col-in-main);
  max-width: var(--msgs-v2-right-col-in-main);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.message-detail-side-toggle {
  border: 1px solid #dcdceb;
  border-radius: 10px;
  background: #fafafc;
  min-width: 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5d6385;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.message-detail-side-toggle:hover {
  border-color: #00644b;
  color: #00644b;
  background: #f5f9f8;
}

.message-detail-side-toggle i {
  font-size: 12px;
}

.message-detail-drawer-close-row {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 0;
  border-bottom: 1px solid #dcdceb;
}

.message-detail-drawer-close {
  border: 1px solid #dcdceb;
  background: #fafafc;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5d6385;
  z-index: 3;
}

.message-detail-drawer-close:hover {
  border-color: #00644b;
  color: #00644b;
  background: #f5f9f8;
}

.message-detail-side-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 23, 0.32);
  z-index: 1200;
}

/* ============================================================
 * Left Column · Header + Search + Tabs
 * ============================================================ */

.msgs-v2-list-head {
  flex: 0 0 auto;
  padding: 18px 16px 12px;
  border-bottom: 1px solid #eef1f6;
  background: #FAFAFC;
}

.msgs-v2-list-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.msgs-v2-list-title {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #0f172a;
}

.msgs-v2-list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.msgs-v2-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #e5e9f1;
  border-radius: 10px;
  background: #ffffff;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.14s ease;
  position: relative;
}

.msgs-v2-icon-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #dbe2ee;
}

.msgs-v2-icon-btn.has-active-filters {
  color: #0f865e;
  border-color: #b9e8d6;
  background: #ecfaf3;
}

.msgs-v2-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
  position: absolute;
  top: -2px;
  right: -2px;
  box-shadow: 0 0 0 2px #ffffff;
}

.msgs-v2-search-shell {
  position: relative;
  margin-bottom: 12px;
}

.msgs-v2-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 14px;
  pointer-events: none;
}

.msgs-v2-search-input {
  width: 100%;
  height: 44px;
  border: 1px solid #e4e9f2;
  border-radius: 12px;
  padding: 0 54px 0 36px;
  font-size: 15px;
  color: #111827;
  background: #ffffff;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.msgs-v2-search-input::placeholder {
  color: #98a2b3;
}

.msgs-v2-search-input:focus {
  outline: none;
  border-color: #8fd5bd;
  box-shadow: 0 0 0 3px rgba(0, 100, 75, 0.1);
}

.msgs-v2-search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid #e4e9f2;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  background: #fbfcfe;
}

.msgs-v2-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.msgs-v2-filter-tab {
  border: 1px solid #e8ecf3;
  border-radius: 12px;
  background: #ffffff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.msgs-v2-filter-tab:hover {
  background: #f8fafc;
  color: #0f172a;
}

.msgs-v2-filter-tab.active {
  background: #eaf8f2;
  border-color: #bce6d6;
  color: #0f865e;
}

.msgs-v2-filter-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #e5e9f1;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.msgs-v2-filter-tab.active .msgs-v2-filter-count {
  background: #d8f1e7;
  border-color: #a8dfca;
  color: #0d7f59;
}

.msgs-v2-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px 12px;
}

.msgs-v2-load-more {
  margin-top: 4px;
  border: 1px solid #e5e9f1;
  border-radius: 12px;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 12px;
}

.msgs-v2-load-more:hover,
.msgs-v2-load-more:focus {
  border-color: #d8e2ef;
  background: #f8fafc;
  color: #334155;
}

/* ============================================================
 * Empty State
 * ============================================================ */

.msgs-v2-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  height: 100%;
  padding: 40px 24px;
  text-align: center;
}

.msgs-v2-empty-state__img {
  width: 120px;
  max-width: 50%;
  opacity: 0.35;
  margin-bottom: 24px;
}

.msgs-v2-empty-state__title {
  font-size: 22px;
  font-weight: 600;
  color: #94a3b8;
  margin: 0 0 8px;
}

.msgs-v2-empty-state__subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #94a3b8;
  margin: 0;
}

.msgs-v2-detail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  height: 100%;
}

/* ============================================================
 * Conversation Row
 * ============================================================ */

.v2cr {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 2px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #FAFAFC;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.v2cr:hover {
  border-color: #e3e8f1;
  background: #fff;
}

.v2cr--selected {
  border-color: #9fdac4 !important;
  background: #ebf8f2 !important;
  box-shadow: inset 0 0 0 1px rgba(0, 100, 75, 0.06);
}

.v2cr--error {
  background: #fff4e8;
  border-color: #f3d2ad;
}

.v2cr--error:hover {
  background: #ffefdd;
  border-color: #efc290;
}

.v2cr--error.v2cr--selected {
  background: #ffefdd !important;
  border-color: #efc290 !important;
  box-shadow: inset 0 0 0 1px rgba(217, 126, 28, 0.22);
}

.v2cr--unread .v2cr-name {
  font-weight: 600;
}

.v2cr--unread .v2cr-preview {
  color: #334155;
  font-weight: 400;
}

.v2cr-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #00644b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.v2cr-avatar-shell {
  position: relative;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v2cr-session-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  z-index: 3;
}

.v2cr-session-dot--green {
  background: #22c55e;
}

.v2cr-session-dot--yellow {
  background: #f59e0b;
}

.v2cr-session-dot--red {
  background: #ef4444;
}

.v2cr-avatar-initials {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.v2cr-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.v2cr-top-row {
  display: block;
}

.v2cr-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.v2cr-side {
  flex: 0 0 44px;
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 50px;
}

.v2cr-time {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
}

.v2cr-bottom-row {
  display: flex;
  align-items: center;
}

.v2cr-preview {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: #64748b;
}

.v2cr-meta-row {
  display: flex;
  align-items: center;
  min-height: 16px;
  margin-top: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.v2cr-meta-row::-webkit-scrollbar {
  display: none;
}

.v2cr-assigned-name {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.2;
  color: #6b7090;
  font-weight: 400;
  letter-spacing: 0.01rem;
  white-space: nowrap;
  text-transform: uppercase;
}

.v2cr-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #10b981;
}

.v2cr-read-later-btn {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  opacity: 0.82;
}

.v2cr-read-later-btn:hover {
  opacity: 1;
}

.v2cr-read-later-btn img {
  width: 18px;
  height: 18px;
  display: block;
}

.v2cr-read-later-on {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #10b981;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}


.v2cr-read-later-on:hover {
  background: #10b98166;
}

.v2cr-ai-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  margin-left: 6px;
  background: #e9f5ff;
  color: #1768a6;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.v2cr-label-icon {
  width: 14px;
  height: auto;
  vertical-align: middle;
  margin-left: 4px;
  margin-top: -1px;
}

.v2cr-flow-tag {
  display: inline-flex;
  align-items: center;
  max-width: 130px;
  height: 18px;
  padding: 0 7px;
  border-radius: 10px;
  margin-left: 5px;
  background: #f1eeff;
  color: #776da3;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
 * Center Column · Chat Design
 * ============================================================ */

.msgs-v2-chat-inner .message-detail-layout.compact-mode {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.msgs-v2-chat-inner .chat-block.chat-block-v2-footer {
  height: 100% !important;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

.msgs-v2-chat-inner .message-detail-topbar-row {
  flex: 0 0 auto;
  padding: 0 !important;
  border-bottom: 1px solid #e6ebf4;
  background: #ffffff;
}

.msgs-v2-chat-inner .message-detail-chat-header {
  padding: 0 !important;
}

.msgs-v2-chat-inner .v2-chat-head-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /*padding: 14px 16px 12px;*/
}

.msgs-v2-chat-inner .v2-chat-head-contact {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.msgs-v2-chat-inner .v2-chat-head-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.msgs-v2-chat-inner .v2-chat-head-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.msgs-v2-chat-inner .v2-chat-head-avatar-initials {
  line-height: 1;
}

.msgs-v2-chat-inner .v2-chat-head-avatar-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid #ffffff;
}

.msgs-v2-chat-inner .v2-chat-head-avatar-dot--green {
  background: #22c55e;
}

.msgs-v2-chat-inner .v2-chat-head-avatar-dot--yellow {
  background: #f59e0b;
}

.msgs-v2-chat-inner .v2-chat-head-avatar-dot--red {
  background: #ef4444;
}

.msgs-v2-chat-inner .v2-chat-head-contact-copy {
  min-width: 0;
}

.msgs-v2-chat-inner .v2-chat-head-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
  font-weight: 700;
  color: #1f2a44;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msgs-v2-chat-inner .v2-chat-head-phone {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  color: #7c889f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msgs-v2-chat-inner .v2-chat-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn {
  min-height: 36px;
  border: 1px solid #00644b;
  border-radius: 10px;
  background: #fff;
  color: #00644b;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn i {
  font-size: 12px;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn span {
  display: inline-block;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn:hover {
  border-color: #b9c7da;
  background: #f9fbfe;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn.is-unassigned {
  background: #fff;
  border-color: #00644b;
  color: #00644b;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn.is-unassigned:hover {
  background: #f4faf8;
  border-color: #00644b;
  color: #00644b;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn.is-assigned {
  background: #00644b;
  border-color: #00644b;
  color: #fff;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn.is-assigned:hover {
  background: #035f47;
  border-color: #035f47;
  color: #fff;
}

.msgs-v2-chat-inner .v2-chat-head-assign-btn.is-ai {
  border-color: #d7cdef;
  background: #f6f2ff;
  color: #5943c9;
}

.msgs-v2-chat-inner .v2-chat-head-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  color: #8390a6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.msgs-v2-chat-inner .v2-chat-head-icon-btn:hover {
  border-color: #c6d2e3;
  background: #f8fafd;
  color: #3d4b65;
}

.msgs-v2-chat-inner .v2-chat-head-icon-btn.is-active {
  color: #d29f1f;
}

.msgs-v2-chat-inner .message-detail-assignment-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.msgs-v2-chat-inner .message-detail-assignment-main {
  flex: 1 1 auto;
  min-height: 38px;
  border-radius: 12px;
  padding: 8px 12px !important;
  margin-bottom: 0;
}

.msgs-v2-chat-inner .message-detail-assignment-main .span_assigned,
.msgs-v2-chat-inner .message-detail-assignment-main .underline {
  font-size: 13px !important;
  line-height: 18px;
}

.msgs-v2-chat-inner .message-detail-assignment-main .font-regular {
  font-size: 12px !important;
}

.msgs-v2-chat-inner .private-events-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid #e6ebf4;
  background: #fafbfe;
  flex-shrink: 0;
}

.msgs-v2-chat-inner .private-events-toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7090;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.msgs-v2-chat-inner .private-events-toggle-switch {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  border: 0;
  background: #dcdceb;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease;
}

.msgs-v2-chat-inner .private-events-toggle-switch.is-on {
  background: #00644b;
}

.msgs-v2-chat-inner .private-events-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: left 0.18s ease;
  display: block;
}

.msgs-v2-chat-inner .private-events-toggle-switch.is-on .private-events-toggle-knob {
  left: 16px;
}

.msgs-v2-chat-inner .chat-block.chat-block-v2-footer .chat-messages-row {
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
  min-height: 0;
  padding-left: 20px;
  padding-right: 20px;
}

.msgs-v2-chat-inner .chat-block.chat-block-v2-footer .chat-messages-col {
  float: none;
  width: 100%;
  min-height: 0;
  display: flex;
  padding: 0;
}

.msgs-v2-chat-inner .chat-block.chat-block-v2-footer .chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px 16px;
  background-color: #fff;
  background-image:
    radial-gradient(circle at 16px 16px, rgba(216, 221, 229, 0.18) 1px, transparent 1.5px),
    radial-gradient(circle at 52px 52px, rgba(216, 221, 229, 0.14) 1px, transparent 1.5px);
  background-size: 72px 72px;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-row {
  margin-bottom: 8px !important;
  display: flex;
  flex-direction: column;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-row-client {
  align-items: flex-start;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-row-admin {
  align-items: flex-end;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-row-client .message-card,
.msgs-v2-chat-inner .chat-block .chat-messages .message-row-client .message-meta-row {
  margin-left: 42px;
  margin-right: auto;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-row-admin .message-card,
.msgs-v2-chat-inner .chat-block .chat-messages .message-row-admin .message-meta-row {
  margin-right: 22px;
  margin-left: auto;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card {
  position: relative;
  max-width: min(52%, 620px);
  width: fit-content;
  clear: both;
  box-shadow: none;
  align-self: flex-start;
  background: transparent;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card.message_interactive,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card.message_image,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card.message_document,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card.message_video,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card.message_voice,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card.message_audio,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card.message_order {
  max-width: min(60%, 700px);
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card .message-content-rich {
  position: relative;
  padding: 12px;
  border-radius: 10px;
  border-width: 1px;
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.05);
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card .text-message {
  padding: 0;
  margin: 0;
  white-space: break-spaces;
  overflow-wrap: break-word;
  color: #171717;
  font-size: 16px;
  line-height: 1.42;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card .reply_text,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card .template-info-value,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card .template-info-label {
  font-size: 14px;
  line-height: 1.4;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card .text-message-reply {
  padding: 10px;
  border-radius: 10px;
  width: 100%;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card.private-true .message-content-rich {
  padding: 0;
  border-color: transparent;
  box-shadow: none;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-row-client .message-card.private-true,
.msgs-v2-chat-inner .chat-block .chat-messages .message-row-admin .message-card.private-true {
  margin-left: 42px;
  margin-right: 42px;
  max-width: calc(100% - 84px);
  width: calc(100% - 84px);
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card .message-content-rich img,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card .message-content-rich .image-message {
  max-width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
}

.msgs-v2-chat-inner .chat-block .chat-messages .message-card .message-content-rich video,
.msgs-v2-chat-inner .chat-block .chat-messages .message-card .message-content-rich embed {
  max-width: 100%;
  height: auto;
  max-height: 280px;
  border-radius: 12px;
}

.msgs-v2-chat-inner .message-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #6b7090;
  margin-top: 4px;
  max-width: min(60%, 700px);
  width: fit-content;
}

.msgs-v2-chat-inner .message-meta-row.is-client {
  justify-content: flex-start;
}

.msgs-v2-chat-inner .message-meta-row.is-admin {
  justify-content: flex-end;
}

.msgs-v2-chat-inner .message-meta-row img,
.msgs-v2-chat-inner .message-meta-row .icon-check-message,
.msgs-v2-chat-inner .message-meta-row .icon-check-message-12px {
  width: 16px;
  height: 16px;
}

.msgs-v2-chat-inner .message-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msgs-v2-chat-inner .chat-footer.chat-footer-v2 {
  position: relative;
  bottom: auto;
  width: 100%;
  display: flex;
  flex: 0 0 auto;
  z-index: 20;
  border-top: 1px solid #dde4ef;
  background: #ffffff;
  height: auto !important;
  transition: all 0.2s ease;
}

.msgs-v2-chat-inner .chat-footer.chat-footer-v2>.col-lg-12 {
  float: none;
  width: 100%;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-shell {
  height: auto;
  min-height: 165px;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  background: #fdfdff;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 10px 9px;
  border-bottom: 1px solid #e8edf5;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  background: #f8fafd;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tabs::-webkit-scrollbar {
  display: none;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tab {
  border: 1px solid #dcdceb;
  background: #ffffff;
  color: #6b7090;
  border-radius: 8px;
  min-width: auto;
  height: 26px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: normal;
  line-height: 1.2;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tab.chat-footer-v2-tab-ai {
  width: 36px;
  min-width: auto;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #2db7fd, #03fafa, #05cd59, #fdd636, #ff7112, #bb62f4) border-box;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tab .chat-footer-v2-tab-ai-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tab.active {
  border-color: #00644b;
  background: rgba(0, 100, 75, 0.1);
  color: #00644b;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tab.is-disabled,
.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tab[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-bottom: 1px solid #edf1f7;
  background: #fffdf4;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-status i {
  color: #c6a700;
  margin-top: 1px;
  font-size: 13px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-status p {
  margin: 0;
  color: #5f5660;
  font-size: 12px;
  line-height: 1.35;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tags {
  border-bottom: 1px solid #edf1f7;
  min-height: 40px;
  padding-right: 10px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tags ul {
  margin: 0;
  padding-top: 8px;
  padding-bottom: 0;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tags li p {
  margin-bottom: 0;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-panel {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 10px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-content.has-emoji-open {
  overflow: visible;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-content.has-more-open {
  overflow: visible;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-text {
  position: relative;
  display: block;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-shell {
  position: relative;
  border: 1px solid #d8deea;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 10px 8px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-shell:focus-within {
  border-color: #c6d2e3;
  box-shadow: 0 0 0 2px rgba(198, 210, 227, 0.25);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-textarea {
  width: 100%;
  min-height: 24px;
  max-height: 45vh;
  resize: none;
  overflow-y: auto;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 2px 4px 6px;
  font-size: 14px;
  line-height: 1.45;
  color: #171717;
  transition: height 0.12s ease;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-textarea::placeholder {
  color: #a6afc2;
  font-weight: 600;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-textarea:focus {
  outline: none;
  box-shadow: none;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-inline-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 2px 4px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-inline-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-inline-upload-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7090;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-inline-upload-close {
  width: 24px;
  height: 24px;
  border: 1px solid #d7deeb;
  border-radius: 8px;
  background: #f9fbff;
  color: #7f8ba3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-inline-upload-close:hover {
  color: #51617e;
  border-color: #c8d3e5;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-inline-upload-field {
  min-height: 42px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-inline-upload+.chat-footer-v2-input-actions {
  margin-top: 4px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-tool-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #7e8aa2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-tool-btn.is-active {
  background: #eef4ff;
  color: #445f94;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-tool-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-tool-btn i {
  font-size: 20px;
  line-height: 1;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-send-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-more-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #eef1f7;
  border-radius: 11px;
  background: #f6f8fc;
  color: #6f7b93;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-more-btn.is-open {
  border-color: #c8d3e5;
  background: #eef3fb;
  color: #51617e;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-more-btn i {
  font-size: 16px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-more-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 35;
  min-width: 210px;
  border: 1px solid #d8deea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(34, 46, 79, 0.2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-more-item {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #2b3347;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  padding: 8px 10px;
  cursor: pointer;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-more-item-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6f7b93;
  flex: 0 0 auto;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-more-item-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-more-item-label {
  min-width: 0;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-more-item:hover {
  background: #f4f7fc;
  color: #1f2f48;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-more-item:hover .chat-footer-v2-more-item-icon {
  color: #465e8b;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-send-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 0;
  background: #00644b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-send-icon-btn img {
  filter: brightness(0) invert(1);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-text .chat-footer-v2-send-icon-btn {
  position: static;
  margin: 0;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-send-icon-btn:hover {
  background: #085a45;
  border-color: #085a45;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-send-icon-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: #b9c4d4;
  border-color: #b9c4d4;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-hint {
  display: block;
  margin-top: 6px;
  padding: 0 2px;
  font-size: 12px;
  color: #6b7090;
  line-height: 1.35;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-emoji-popover {
  position: absolute;
  left: 10px;
  bottom: 52px;
  z-index: 25;
  width: min(340px, calc(100% - 20px));
  border: 1px solid #d8deea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(34, 46, 79, 0.2);
  padding: 8px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-emoji-search {
  width: 100%;
  height: 34px;
  border: 1px solid #dde5f1;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 13px;
  color: #2b3347;
  outline: none;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-emoji-grid {
  margin-top: 8px;
  max-height: 176px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  padding-right: 2px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-emoji-btn {
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-emoji-btn:hover {
  background: #f5f8fe;
  border-color: #dbe5f4;
}

.msgs-v2-chat-inner .chat-footer-v2-hint--typing {
  color: #00644b;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  position: static;
  margin-top: 6px;
  font-size: 11px;
}

.msgs-v2-chat-inner .typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.msgs-v2-chat-inner .typing-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #00644b;
  animation: typing-bounce 1.1s infinite ease-in-out;
}

.msgs-v2-chat-inner .typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.msgs-v2-chat-inner .typing-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.msgs-v2-chat-inner .typing-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-upload-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-upload-inline-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-attachment-types {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-attachment-type-btn {
  border: 1px solid #dcdceb;
  border-radius: 999px;
  background: #fafafc;
  color: #59608a;
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.14s ease;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-attachment-type-btn.active {
  border-color: #00644b;
  background: rgba(0, 100, 75, 0.08);
  color: #00644b;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-select,
.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-upload-inline-input {
  border-radius: 12px;
  background: #fafafc;
  border: 1px solid #dcdceb;
  height: 40px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-flow label,
.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-upload-meta label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7090;
  margin-bottom: 6px;
  display: block;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-flow label:not(:first-child) {
  margin-top: 10px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-inline-actions {
  grid-column: 1 / span 2;
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-template-btn {
  margin-top: 8px;
  width: 100%;
  min-width: 0;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.25;
  border-radius: 10px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-flow-empty,
.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-flow-note,
.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-template p,
.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-soon-subtitle {
  font-size: 12px;
  color: #6b7090;
  margin: 8px 0 0;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-soon-subtitle a,
.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-flow-empty a {
  color: #00644b;
  font-weight: 600;
  text-decoration: underline;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-ai-coming {
  border: 1px solid #dcdceb;
  border-radius: 12px;
  background: #fafafc;
  padding: 12px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-ai-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #171717;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-ai-badge {
  border: 1px solid rgba(102, 77, 255, 0.25);
  background: rgba(102, 77, 255, 0.12);
  color: #5340c5;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-ai-subtitle {
  margin: 0 0 8px;
  font-size: 12px;
  color: #6b7090;
  line-height: 1.4;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-ai-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-ai-list li {
  font-size: 12px;
  color: #31374e;
  line-height: 1.35;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-flow-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7090;
  font-size: 13px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-head .chat-footer-v2-select {
  flex: 1 1 260px;
  min-width: 0;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-head .chat-footer-v2-type-filter {
  flex: 0 0 190px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-item {
  text-align: left;
  border: 1px solid #dcdceb;
  border-radius: 12px;
  background: #fafafc;
  padding: 10px 12px;
  transition: all 0.16s ease;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-item:hover {
  border-color: #00644b;
  background: #f5f9f8;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top span {
  font-size: 12px;
  color: #171717;
  font-weight: 600;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top .interactive-type-pill {
  border-radius: 999px;
  border: 1px solid #dcdceb;
  background: #f6f7fb;
  color: #4f567b;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top .interactive-type-pill.interactive-type-button {
  border-color: rgba(0, 100, 75, 0.25);
  color: #00644b;
  background: rgba(0, 100, 75, 0.1);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top .interactive-type-pill.interactive-type-text {
  border-color: rgba(23, 23, 23, 0.2);
  color: #171717;
  background: rgba(23, 23, 23, 0.08);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top .interactive-type-pill.interactive-type-image {
  border-color: rgba(0, 132, 255, 0.25);
  color: #0067c7;
  background: rgba(0, 132, 255, 0.1);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top .interactive-type-pill.interactive-type-document {
  border-color: rgba(131, 90, 0, 0.24);
  color: #835a00;
  background: rgba(131, 90, 0, 0.12);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top .interactive-type-pill.interactive-type-cta_url {
  border-color: rgba(0, 132, 255, 0.25);
  color: #0067c7;
  background: rgba(0, 132, 255, 0.1);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top .interactive-type-pill.interactive-type-carousel {
  border-color: rgba(102, 77, 255, 0.25);
  color: #5340c5;
  background: rgba(102, 77, 255, 0.12);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-top .interactive-type-pill.interactive-type-product_carousel {
  border-color: rgba(230, 102, 96, 0.3);
  color: #b24d48;
  background: rgba(230, 102, 96, 0.12);
}

.msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-interactive-item p {
  margin: 0;
  font-size: 12px;
  color: #6b7090;
  line-height: 1.35;
}

@keyframes typing-bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@media (max-width: 1320px) {

  .msgs-v2-chat-inner .chat-block .chat-messages .message-row-client .message-card,
  .msgs-v2-chat-inner .chat-block .chat-messages .message-row-client .message-meta-row {
    margin-left: 24px;
  }

  .msgs-v2-chat-inner .chat-block .chat-messages .message-row-admin .message-card,
  .msgs-v2-chat-inner .chat-block .chat-messages .message-row-admin .message-meta-row {
    margin-right: 24px;
  }

  .msgs-v2-chat-inner .chat-block .chat-messages .message-card,
  .msgs-v2-chat-inner .message-meta-row {
    max-width: 64%;
  }
}

@media (max-width: 920px) {
  .msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-shell {
    min-height: 132px;
    max-height: min(58vh, 460px);
  }

  .msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-content {
    padding: 8px 10px 10px;
  }

  .msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-tabs {
    padding: 8px 10px 6px;
  }

  .msgs-v2-chat-inner .v2-chat-head-name {
    font-size: 17px;
  }

  .msgs-v2-chat-inner .v2-chat-head-phone {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .msgs-v2-chat-inner .message-detail-chat-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .msgs-v2-chat-inner .chat-block .chat-messages .message-row-client .message-card,
  .msgs-v2-chat-inner .chat-block .chat-messages .message-row-client .message-meta-row {
    margin-left: 10px;
  }

  .msgs-v2-chat-inner .chat-block .chat-messages .message-row-admin .message-card,
  .msgs-v2-chat-inner .chat-block .chat-messages .message-row-admin .message-meta-row {
    margin-right: 10px;
  }

  .msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-text,
  .msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-upload-inline {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-shell {
    padding: 9px 8px 7px;
  }

  .msgs-v2-chat-inner .chat-footer-v2 .chat-footer-v2-input-tool-btn i {
    font-size: 18px;
  }

  .msgs-v2-chat-inner .v2-chat-head-main {
    /*padding: 12px 10px 10px;*/
    align-items: flex-start;
  }

  .msgs-v2-chat-inner .v2-chat-head-name {
    font-size: 16px;
  }

  .msgs-v2-chat-inner .v2-chat-head-actions {
    gap: 6px;
  }

  .msgs-v2-chat-inner .v2-chat-head-assign-btn {
    min-height: 34px;
    padding: 0 9px;
  }

  .msgs-v2-chat-inner .v2-chat-head-assign-btn span {
    max-width: 110px;
  }
}

/* ============================================================
 * Right Column · User Detail
 * ============================================================ */

.dp-panel {
  position: relative;
  border-left: 1px solid #e4e9f2;
}

.dp-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid #e9edf5;
  background: #ffffff;
  flex: 0 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.dp-tabs::-webkit-scrollbar {
  display: none;
}

.dp-tab {
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  padding: 14px 2px 13px;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
  white-space: nowrap;
  flex: 0 0 auto;
}

.dp-tab:hover {
  color: #0f172a;
}

.dp-tab--active {
  color: #0f865e;
  border-bottom-color: #0f865e;
}

.dp-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background-color: #FAFAFC;
}

.dp-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid #eef1f6;
}

.dp-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.dp-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #00644b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dp-avatar-initials {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.dp-avatar-presence {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #ffffff;
  position: absolute;
  right: 2px;
  bottom: 2px;
}

.dp-contact-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.dp-contact-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.dp-contact-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-contact-sub {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.01em;
}

.dp-contact-score {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 100, 75, 0.2);
  background: rgba(0, 100, 75, 0.08);
  border-radius: 999px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: filter 0.14s ease;
}

.dp-contact-score span {
  color: #6B7090;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 700;
  line-height: 1;
}

.dp-contact-score strong {
  color: #00644B;
  font-size: 17px;
  line-height: 1;
  font-weight: 800;
}

.dp-contact-score:hover {
  filter: brightness(0.98);
}

.dp-contact-score.is-medium {
  border-color: rgba(230, 206, 96, 0.38);
  background: rgba(230, 206, 96, 0.2);
}

.dp-contact-score.is-medium strong {
  color: #6a5800;
}

.dp-contact-score.is-high {
  border-color: rgba(230, 104, 96, 0.3);
  background: rgba(230, 104, 96, 0.12);
}

.dp-contact-score.is-high strong {
  color: #9b2f2a;
}

@media (max-width: 1540px) {
  .dp-contact-head {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .dp-contact-score {
    align-self: flex-start;
  }
}

.dp-session-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.dp-session-dot--green {
  background: #22c55e;
}

.dp-session-dot--yellow {
  background: #f59e0b;
}

.dp-session-dot--red {
  background: #ef4444;
}

.dp-avatar-presence--green {
  background: #22c55e;
}

.dp-avatar-presence--yellow {
  background: #f59e0b;
}

.dp-avatar-presence--red {
  background: #ef4444;
}

.dp-contact-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dp-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #e5e9f1;
  border-radius: 10px;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.14s ease;
}

.dp-icon-btn:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: #dbe2ee;
}

.dp-contact-actions .dp-icon-btn.is-open {
  border-color: #c8d3e5;
  background: #eef3fb;
  color: #51617e;
}

.dp-contact-actions .chat-footer-v2-more-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 210px;
  border: 1px solid #d8deea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(34, 46, 79, 0.2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dp-contact-actions .chat-footer-v2-more-item {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #2b3347;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  padding: 8px 10px;
  cursor: pointer;
}

.dp-contact-actions .chat-footer-v2-more-item:hover {
  background: #f4f7fc;
  color: #1f2f48;
}

.dp-contact-actions .chat-footer-v2-more-item-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6f7b93;
  flex: 0 0 auto;
}

.dp-contact-actions .chat-footer-v2-more-item-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.dp-contact-actions .chat-footer-v2-more-item:hover .chat-footer-v2-more-item-icon {
  color: #465e8b;
}

.dp-info-rows {
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dp-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dp-optin-pill {
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid #dde6f1;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dp-optin-pill--ok {
  color: #1f7a55;
  background: #eaf8f1;
  border-color: #b9e2cd;
}

.dp-optin-pill--wait {
  color: #8f5a12;
  background: #fff6e8;
  border-color: #f2deba;
}

.dp-optin-pill--off {
  color: #a13e4b;
  background: #fff0f2;
  border-color: #f2c8cf;
}

.dp-optin-pill--idle {
  color: #64748b;
  background: #f5f8fc;
  border-color: #dce4ef;
}

.dp-info-icon {
  flex: 0 0 16px;
}

.dp-info-text {
  font-size: 15px;
  color: #334155;
}

.dp-section {
  padding: 16px 18px;
  border-bottom: 1px solid #eef1f6;
}

.dp-section--ai {
  border-bottom: none;
}

.dp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.dp-section-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dp-score-pill {
  border: 1px solid #dce3ef;
  background: #f8fafd;
  color: #42526b;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.dp-score-pill:hover {
  background: #f2f6fb;
  border-color: #cfd8e7;
}

.dp-icon-min-btn {
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  cursor: pointer;
}

.dp-icon-min-btn:hover {
  background: #f3f6fb;
  color: #334155;
}

.dp-view-all {
  border: 0;
  background: transparent;
  padding: 0;
  color: #0f865e;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.dp-view-all:hover {
  text-decoration: underline;
}

.dp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #e6ecf6;
  background: #f5f8fc;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
}

.dp-tag--label {
  border-width: 1px;
  border-style: solid;
  font-weight: 600;
}

.dp-tag-label-text {
  display: inline-block;
  line-height: 1.2;
  font-weight: 600;
}

.dp-tag-remove {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  cursor: pointer;
}

.dp-tag-remove:hover {
  opacity: 1;
}

.dp-tag-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: inline-block;
}

.dp-tag--tone-1 {
  background: #eef8ff;
  border-color: #cfe8ff;
  color: #24517a;
}

.dp-tag--tone-2 {
  background: #f2f4ff;
  border-color: #d9deff;
  color: #3f4ca3;
}

.dp-tag--tone-3 {
  background: #ecfbf3;
  border-color: #cdeedb;
  color: #1f6d48;
}

.dp-tag--tone-4 {
  background: #fff6e8;
  border-color: #f2dfbd;
  color: #805217;
}

.dp-tag--tone-5 {
  background: #f7f0ff;
  border-color: #e6d7fb;
  color: #6342a8;
}

.dp-tag-add {
  border-style: dashed;
  background: #ffffff;
  color: #94a3b8;
  cursor: pointer;
}

.dp-tag-add:hover {
  color: #0f865e;
  border-color: #8fd5bd;
}

.dp-note-text {
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.dp-note-display {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  /*padding: 8px 8px 2px;*/
  cursor: text;
}

.dp-note-display:hover {
  border-color: #e5ebf3;
  background: #fbfdff;
}

.dp-note-empty {
  color: #9aa7b8;
  font-size: 13px;
  font-style: italic;
}

.dp-note-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dp-note-input {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
  padding: 8px 10px;
}

.dp-note-input:focus {
  outline: none;
  border-color: #8fd5bd;
  box-shadow: 0 0 0 2px rgba(0, 100, 75, 0.08);
}

.dp-note-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dp-note-action {
  width: 28px;
  height: 28px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dp-note-action:hover {
  background: #f5f9ff;
  border-color: #cbd7e8;
}

.dp-note-action--save {
  color: #0f865e;
  border-color: #bfe5d6;
}

.dp-note-action[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.dp-tags-input {
  width: 100%;
}

.dp-tags-input .tags {
  border: 1px solid #e1e7f1;
  border-radius: 12px;
  min-height: 40px;
  padding: 4px 8px;
  box-shadow: none !important;
}

.dp-tags-input .tags.focused {
  border-color: #8fd5bd;
  box-shadow: 0 0 0 2px rgba(0, 100, 75, 0.08);
}

.dp-tags-input .tags .tag-item {
  background: #f1f5fb;
  border: 1px solid #dce5f1;
  color: #415166;
  border-radius: 999px;
  font-size: 12px;
  height: 24px;
  line-height: 22px;
  padding: 0 9px;
}

.dp-tags-input .tags .input {
  font-size: 13px;
  color: #475569;
}

.dp-extra-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dp-extra-item {
  width: 100%;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.dp-extra-item:hover {
  border-color: #d3dde9;
  background: #f9fbfe;
}

.dp-extra-label {
  flex: 0 0 38%;
  color: #607289;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dp-extra-value {
  flex: 1 1 auto;
  color: #1f2937;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  padding-right: 8px;
}

.dp-extra-edit {
  flex: 0 0 auto;
  color: #a0aec0;
  font-size: 12px;
}

.dp-empty-inline {
  margin: 2px 0 0;
  color: #9aa7b8;
  font-size: 12px;
}

.dp-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 20px;
  gap: 7px;
}

.dp-empty-title {
  margin: 6px 0 0;
  font-size: 14px;
  color: #5c6e84;
  font-weight: 700;
}

.dp-empty-subtitle {
  margin: 0;
  font-size: 12px;
  color: #9aa6b5;
}

.dp-recent-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dp-recent-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  /*padding: 8px;*/
  padding: 4px;
  cursor: pointer;
  border-radius: 10px;
  /*transition: background 0.14s ease;
  background-color: #ffffff;*/
}


.dp-recent-item.more-focus {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.14s ease;
  background-color: #ffffff;
}


.dp-recent-item:hover {
  background: #fff;
}

.dp-recent-icon {
  flex: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dp-recent-body {
  flex: 1 1 auto;
  min-width: 0;
}

.dp-recent-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dp-recent-sub {
  margin-top: 1px;
  color: #64748b;
  font-size: 12px;
}

.dp-recent-badge {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.dp-recent-more {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9aa7b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dp-recent-more:hover {
  background: #f1f5fb;
  color: #4a5b71;
}

.dp-recent-item .up-act-popover {
  position: absolute;
  right: 8px;
  top: calc(100% - 4px);
  z-index: 30;
}

.dp-panel .up-act-popover {
  min-width: 200px;
  border: 1px solid #e3e9f3;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(18, 24, 40, 0.12);
  padding: 6px;
}

.dp-panel .up-act-popover-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #2d3a50;
  border-radius: 8px;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.dp-panel .up-act-popover-item:hover {
  background: #f4f7fb;
}

.dp-panel .up-act-popover-item--arrow {
  justify-content: space-between;
}

.dp-panel .up-act-popover-item--arrow .up-act-popover-chevron {
  margin-left: auto;
  transition: transform 0.14s ease;
}

.dp-panel .up-act-popover-chevron--open {
  transform: rotate(180deg);
}

.dp-panel .up-act-status-submenu {
  margin: 5px 0 4px;
  padding: 4px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dp-panel .up-act-status-item {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #506179;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  cursor: pointer;
}

.dp-panel .up-act-status-item:hover {
  background: #f2f5fa;
}

.dp-panel .up-act-status-item--active {
  background: #ecf3ff;
  color: #2a4f83;
}

.dp-panel .up-act-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 7px;
}

.apd-overlay {
  z-index: 2400;
}

.apd-drawer {
  background: #ffffff;
}

.apd-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.apd-meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apd-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.apd-meta-row>span {
  font-size: 13px;
  color: #667085;
}

.apd-meta-row>strong {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.apd-notes {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1f2937;
}

.apd-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apd-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 10px;
}

.apd-item-row>span {
  font-size: 13px;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apd-item-row>strong {
  flex: 0 0 auto;
  font-size: 12px;
  color: #334155;
}

.apd-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.apd-status-pill {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  min-height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.14s ease;
}

.apd-status-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.apd-status-pill.is-active {
  box-shadow: inset 0 0 0 1px currentColor;
}

.apd-footer .oqd-btn {
  min-width: 0;
}

.dp-ai-card {
  border-radius: 14px;
  border: 1px solid #dcdcf7;
  background: linear-gradient(135deg, #f2ecff 0%, #ebe8ff 100%);
  padding: 14px;
}

.dp-ai-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dp-ai-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #5943c9;
}

.dp-ai-card-body {
  margin: 0 0 10px;
  color: #4c4d76;
  font-size: 13px;
  line-height: 1.45;
}

.dp-ai-card-link {
  border: 0;
  background: transparent;
  color: #5943c9;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.dp-ai-card-link:hover {
  text-decoration: underline;
}

/* ============================================================
 * Responsive
 * ============================================================ */

@media (max-width: 1540px) {
  .msgs-v2-list-col {
    flex-basis: var(--msgs-v2-left-col);
    width: var(--msgs-v2-left-col);
    min-width: var(--msgs-v2-left-col);
    max-width: var(--msgs-v2-left-col);
    background-color: #FAFAFC;
  }

  .msgs-v2-detail-inner {
    flex-basis: var(--msgs-v2-right-col-in-main);
    width: var(--msgs-v2-right-col-in-main);
    min-width: var(--msgs-v2-right-col-in-main);
    max-width: var(--msgs-v2-right-col-in-main);
  }

  .msgs-v2-chat-inner {
    min-width: var(--msgs-v2-chat-col-in-main);
  }
}

@media (max-width: 1440px) {
  .msgs-v2-chat-inner {
    min-width: var(--msgs-v2-chat-col-in-main);
  }
}

@media (max-width: 1320px) {
  .msgs-v2-chat-inner {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .msgs-v2-main-row.drawer-mode-active>.msgs-v2-chat-inner {
    border-right: 0;
  }

  .msgs-v2-main-row.drawer-mode-active>.msgs-v2-detail-inner.drawer-mode {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(760px, 96vw);
    max-width: 96vw;
    min-width: 0;
    z-index: 1201;
    transform: translateX(103%);
    transition: transform 0.22s ease;
    box-shadow: -10px 0 30px rgba(23, 23, 23, 0.2);
    border-left: 1px solid #dcdceb;
    background: #fafafc;
  }

  .msgs-v2-main-row.drawer-mode-active>.msgs-v2-detail-inner.drawer-mode.drawer-open {
    transform: translateX(0);
  }

  .msgs-v2-main-row.drawer-mode-active>.msgs-v2-detail-inner.drawer-mode .dp-scroll {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .msgs-v2-main-row.drawer-mode-active>.msgs-v2-detail-inner.drawer-mode .dp-section--ai {
    padding-bottom: 24px;
  }
}

@media (max-width: 767px) {
  .msgs-v2-main-row.drawer-mode-active>.msgs-v2-detail-inner.drawer-mode {
    width: 100vw;
    max-width: 100vw;
  }
}

@media (max-width: 900px) {
  .msgs-v2-list-col {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .msgs-v2-main-area {
    display: none;
  }

  .msgs-v2-main-area.has-detail {
    display: flex;
  }
}

/* ── WhatsApp Order Bubble ──────────────────────────────────────────── */
.wa-order-bubble {
  width: 100%;
  min-width: 260px;
  max-width: 360px;
}

/* Override bubble bg: order messages should always look like a card */
.message-card.client-message .message-content-rich .wa-order-bubble,
.message-card.admin-message .message-content-rich .wa-order-bubble {
  color: #131826;
}

/* Force white bg on the inner card (sits on top of green/grey bubble bg) */
.message-card.client-message .message-content-rich {
  padding: 0 !important;
  overflow: hidden;
}

/* Header */
.wa-order-bubble-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.wa-order-bubble-icon {
  color: #00644b;
  flex-shrink: 0;
}
.wa-order-bubble-head > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wa-order-bubble-title {
  font-size: 14px;
  font-weight: 700;
  color: #131826;
  line-height: 1.2;
}
.wa-order-bubble-count {
  font-size: 11px;
  font-weight: 600;
  color: #00644b;
}

/* Product list */
.wa-order-bubble-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 0;
  border-radius: 10px;
  background-color: white;
}

.wa-order-bubble-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.wa-order-bubble-item:last-child { border-bottom: 0; }

.wa-order-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.wa-order-item-no-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eef1f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0b8cc;
  flex-shrink: 0;
}

.wa-order-item-info {
  flex: 1;
  min-width: 0;
}
.wa-order-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #131826;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-order-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}
.wa-order-item-qty {
  font-size: 11px;
  font-weight: 600;
  color: #697089;
}
.wa-order-item-price {
  font-size: 13px;
  font-weight: 700;
  color: #131826;
}

/* Total row */
.wa-order-bubble-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 13px;
  color: #697089;
  font-weight: 600;
}
.wa-order-bubble-total strong {
  font-size: 15px;
  font-weight: 800;
  color: #131826;
}

/* CTA */
.wa-order-bubble-cta {
  padding: 8px 14px 12px;
  display: flex;
  justify-content: center;
  background: #01644b;
  border-radius: 10px;
}
.wa-order-bubble-cta-btn {
  border: 0;
  background: transparent;
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.wa-order-bubble-cta-btn:hover { text-decoration: underline; }
