html,
body.chat-page {
  height: 100%;
}

body.chat-page {
  color: var(--text-color, #0f172a);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

body.chat-page .page-layout {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

body.chat-page .main-content {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

body.chat-page .chat-card {
  background: var(--feed-card-bg);
  border: 1px solid var(--feed-card-border);
  border-radius: 28px;
  box-shadow: var(--feed-card-shadow);
  padding: clamp(18px, 2.8vw, 28px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 20px);
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

body.dark.chat-page .chat-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.76));
}

body.theme-luxury-dark.chat-page .chat-card {
  background: linear-gradient(160deg, rgba(10, 13, 20, 0.92), rgba(15, 20, 30, 0.9));
  border-color: rgba(214, 184, 121, 0.28);
  box-shadow: 0 36px 78px -40px rgba(2, 6, 23, 0.85);
}

body.theme-luxury-dark.chat-page .chat-card__action {
  border-color: rgba(214, 184, 121, 0.4);
  background: rgba(214, 184, 121, 0.14);
}

body.theme-luxury-dark.chat-page .chat-card__action:hover,
body.theme-luxury-dark.chat-page .chat-card__action:focus-visible {
  border-color: rgba(242, 225, 179, 0.65);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.55);
}

.chat-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.chat-card__title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-card__title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chat-card__subtitle {
  margin: 0;
  color: var(--feed-muted-color);
  font-size: 0.95rem;
}

.chat-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-card__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.32);
  background: rgba(99, 102, 241, 0.12);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.chat-card__action:hover,
.chat-card__action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.25);
  outline: none;
}

.chat-card__shell {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.chat-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  height: 100%;
}

.chat-sidebar__search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-sidebar__search {
  flex: 1;
  position: relative;
}

.chat-sidebar__search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(255, 255, 255, 0.65);
  color: inherit;
  font-size: 0.95rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.dark .chat-sidebar__search input {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(99, 102, 241, 0.38);
}

body.theme-luxury-dark .chat-sidebar__search input {
  background: rgba(10, 13, 20, 0.92);
  border-color: rgba(214, 184, 121, 0.35);
  color: var(--text-color);
}

.chat-sidebar__search input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.chat-sidebar__new {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(14, 165, 233, 0.24));
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-sidebar__new:hover,
.chat-sidebar__new:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
  outline: none;
}

.chat-sidebar__filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-sidebar__ai {
  display: flex;
}

.chat-sidebar__filter {
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.chat-sidebar__filter.is-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(14, 165, 233, 0.35));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.chat-sidebar__filter:hover,
.chat-sidebar__filter:focus-visible {
  background: rgba(99, 102, 241, 0.24);
  outline: none;
}

.chat-sidebar__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.chat-convo__avatar,
.chat-thread__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.28);
}

.chat-convo__avatar--ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  background: radial-gradient(circle at top, rgba(34, 211, 238, 0.9), rgba(99, 102, 241, 0.95));
  box-shadow: 0 12px 22px rgba(79, 70, 229, 0.35);
}

.chat-convo__pill {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.chat-sidebar__empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--feed-muted-color);
  font-size: 0.95rem;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.08);
}

.chat-convo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(148, 163, 184, 0.1);
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
  font: inherit;
  color: inherit;
  text-align: left;
}

.chat-convo:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.18);
  transform: translateY(-1px);
}

.chat-convo.is-active {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.chat-convo:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 2px;
}

.chat-convo__meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-convo__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.chat-convo__title {
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-convo__preview {
  color: var(--feed-muted-color);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-convo__time {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.9);
}

.chat-convo__badge {
  justify-self: flex-end;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
}
.chat-convo__pin {
  border: none;
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.chat-convo__pin.is-active {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}

.chat-thread__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.chat-thread__security {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.14);
  color: var(--feed-muted-color);
  font-size: 0.86rem;
  line-height: 1.4;
}

.chat-thread__security i {
  color: #22c55e;
}

body.dark .chat-thread__security {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(15, 23, 42, 0.72);
}

body.theme-luxury-dark .chat-thread__security {
  border-color: rgba(214, 184, 121, 0.42);
  background: rgba(10, 13, 20, 0.76);
}

body.theme-luxury-dark .chat-thread__security i {
  color: rgba(214, 184, 121, 0.95);
}

.chat-thread__title {
  font-weight: 700;
  font-size: 1.05rem;
}

.chat-thread__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-thread__subtitle {
  font-size: 0.9rem;
  color: var(--feed-muted-color);
}

.chat-thread__badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  font-weight: 600;
}

.chat-thread__messages {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 4px;
}

.chat-thread .date-sep {
  text-align: center;
  color: var(--feed-muted-color);
  font-size: 0.75rem;
  margin: 12px 0 4px;
}

.chat-thread .msg {
  max-width: min(70%, 560px);
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  background: rgba(99, 102, 241, 0.18);
  color: inherit;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  position: relative;
  display: inline-block;
  width: fit-content;
  overflow: visible;
}

.chat-thread .msg img {
  max-width: 320px;
  max-height: 60vh;
  border-radius: 12px;
  display: block;
  margin-top: 10px;
}
.chat-thread .msg video,
.chat-thread .msg audio {
  width: 100%;
  max-width: 360px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  display: block;
}
.msg__file {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  max-width: 360px;
}
.msg__file-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.85rem;
}
.msg__file-meta {
  display: grid;
  gap: 2px;
  font-size: 0.85rem;
}
.msg__file-name {
  font-weight: 600;
}
.msg__file-size {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.7);
}

.chat-thread .msg.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(14, 165, 233, 0.8));
  color: #f8fafc;
}

.chat-thread .msg.theirs {
  align-self: flex-start;
  background: rgba(148, 163, 184, 0.18);
}

.chat-thread .msg .time {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.8);
  white-space: nowrap;
  vertical-align: baseline;
}

.msg__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.msg__receipt {
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.75);
}
.msg__receipt.is-seen {
  color: #7dd3fc;
}

.chat-thread__composer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 0.85rem;
  color: var(--feed-muted-color);
  margin-bottom: 6px;
}

.chat-thread__composer-meta[hidden] {
  display: none !important;
}

.chat-thread__composer-meta button {
  margin-left: auto;
  border: none;
  background: transparent;
  color: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chat-thread__thread-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.08);
  font-size: 0.85rem;
  color: var(--feed-muted-color);
}

.chat-thread__thread-back {
  border: none;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
}

.chat-thread__thread-title {
  font-weight: 700;
  color: inherit;
}

.msg__pin {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c7d2fe;
  margin-bottom: 6px;
}

.msg__reply-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-left: 3px solid rgba(99, 102, 241, 0.7);
  background: rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  font-size: 0.8rem;
  color: inherit;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  border: none;
}

.msg__reply-author {
  font-weight: 700;
}

.msg__reply-text {
  color: rgba(226, 232, 240, 0.8);
}

.msg__forwarded {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.8);
  margin-bottom: 6px;
}

.msg__text {
  word-break: break-word;
  display: inline;
}

.msg__deleted {
  font-style: italic;
  color: rgba(226, 232, 240, 0.7);
}

.msg__reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.msg__reaction {
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(15, 23, 42, 0.2);
  color: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.msg__reaction.is-mine {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.2);
}

.msg__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.msg__footer .time {
  margin-top: 0;
}

.msg__time-only {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.msg__actions {
  position: absolute;
  top: calc(100% + 6px);
  right: 6px;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.45);
  z-index: 2;
  min-width: 160px;
  max-height: 240px;
  overflow-y: auto;
}

.msg--menu-open .msg__actions {
  display: flex;
}

.msg__action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: rgba(148, 163, 184, 0.12);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.msg__action--danger {
  color: #fca5a5;
}

.msg__action:hover,
.msg__action:focus-visible {
  background: rgba(148, 163, 184, 0.22);
  outline: none;
  transform: translateY(-1px);
}

.msg__action-icon {
  font-size: 0.85rem;
}

.msg__more {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: none;
  background: rgba(15, 23, 42, 0.25);
  color: inherit;
  font-size: 0.9rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.msg:hover .msg__more,
.msg:focus-within .msg__more,
.msg--menu-open .msg__more {
  opacity: 1;
}

.msg__more:hover,
.msg__more:focus-visible {
  background: rgba(15, 23, 42, 0.4);
  transform: translateY(-1px);
  outline: none;
}

.msg--highlight {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.55), 0 12px 26px rgba(15, 23, 42, 0.18);
}

.chat-thread__composer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(248, 250, 252, 0.6)),
    rgba(148, 163, 184, 0.08);
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.chat-thread__composer textarea {
  flex: 1;
  min-height: 60px;
  max-height: 200px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
  color: inherit;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 10px 24px -18px rgba(15, 23, 42, 0.25);
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.dark .chat-thread__composer textarea {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(99, 102, 241, 0.38);
}

body.dark .chat-thread__composer {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.75)),
    rgba(148, 163, 184, 0.08);
}

body.theme-luxury-dark .chat-thread__composer textarea {
  background: rgba(10, 13, 20, 0.92);
  border-color: rgba(214, 184, 121, 0.32);
  color: var(--text-color);
}

body.theme-luxury-dark .chat-thread__composer {
  background:
    linear-gradient(135deg, rgba(12, 16, 26, 0.9), rgba(9, 12, 19, 0.82)),
    rgba(214, 184, 121, 0.08);
  border-color: rgba(214, 184, 121, 0.28);
}

.chat-thread__composer textarea::placeholder {
  color: rgba(100, 116, 139, 0.8);
}

body.dark .chat-thread__composer textarea::placeholder,
body.theme-luxury-dark .chat-thread__composer textarea::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

.chat-thread__composer textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2),
    0 14px 28px -18px rgba(15, 23, 42, 0.35);
}

body.theme-luxury-dark .chat-thread__composer textarea:focus {
  border-color: rgba(214, 184, 121, 0.6);
  box-shadow: 0 0 0 3px rgba(214, 184, 121, 0.22),
    0 16px 30px -18px rgba(2, 6, 23, 0.6);
}

.chat-thread__composer .btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-thread__composer .btn:hover,
.chat-thread__composer .btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.36);
  outline: none;
}

.chat-thread__composer .file {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

body.dark .chat-thread__composer .file {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(99, 102, 241, 0.32);
}

body.theme-luxury-dark .chat-thread__composer .file {
  background: rgba(10, 13, 20, 0.92);
  border-color: rgba(214, 184, 121, 0.32);
  color: var(--text-color);
}

.chat-thread__composer .file:hover,
.chat-thread__composer .file:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 10px 22px -16px rgba(15, 23, 42, 0.35);
  outline: none;
}

body.theme-luxury-dark .chat-thread__composer .file:hover,
body.theme-luxury-dark .chat-thread__composer .file:focus-visible {
  border-color: rgba(214, 184, 121, 0.5);
  box-shadow: 0 12px 24px -16px rgba(2, 6, 23, 0.65);
}

body.theme-luxury-dark .chat-sidebar__new {
  border-color: rgba(214, 184, 121, 0.4);
  background: linear-gradient(135deg, rgba(214, 184, 121, 0.2), rgba(139, 107, 42, 0.22));
  color: var(--text-color);
}

body.theme-luxury-dark .chat-sidebar__new:hover,
body.theme-luxury-dark .chat-sidebar__new:focus-visible {
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.65);
}

body.theme-luxury-dark .chat-sidebar__filter {
  background: rgba(214, 184, 121, 0.12);
}

body.theme-luxury-dark .chat-sidebar__filter.is-active {
  background: linear-gradient(135deg, rgba(214, 184, 121, 0.55), rgba(139, 107, 42, 0.45));
  color: #1b1407;
  box-shadow: inset 0 1px 0 rgba(247, 239, 225, 0.2);
}

body.theme-luxury-dark .chat-sidebar__filter:hover,
body.theme-luxury-dark .chat-sidebar__filter:focus-visible {
  background: rgba(214, 184, 121, 0.24);
}

body.theme-luxury-dark .chat-convo {
  background: rgba(214, 184, 121, 0.08);
}

body.theme-luxury-dark .chat-convo:hover {
  border-color: rgba(214, 184, 121, 0.45);
  background: rgba(214, 184, 121, 0.18);
}

body.theme-luxury-dark .chat-convo.is-active {
  border-color: rgba(214, 184, 121, 0.6);
  background: rgba(214, 184, 121, 0.22);
}

body.theme-luxury-dark .chat-convo__pill {
  background: rgba(214, 184, 121, 0.2);
  color: #f7efe1;
  border-color: rgba(214, 184, 121, 0.45);
}

body.theme-luxury-dark .chat-convo__badge {
  background: linear-gradient(135deg, rgba(214, 184, 121, 0.95), rgba(139, 107, 42, 0.9));
  color: #1b1407;
}

body.theme-luxury-dark .chat-thread__header {
  background: rgba(214, 184, 121, 0.08);
  border-color: rgba(214, 184, 121, 0.24);
}

body.theme-luxury-dark .chat-thread__badge {
  border-color: rgba(214, 184, 121, 0.5);
  background: rgba(214, 184, 121, 0.18);
  color: #f7efe1;
}

body.theme-luxury-dark .chat-thread .msg {
  background: rgba(214, 184, 121, 0.14);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.55);
}

body.theme-luxury-dark .chat-thread .msg.mine {
  background: linear-gradient(135deg, rgba(214, 184, 121, 0.95), rgba(139, 107, 42, 0.92));
  color: #1b1407;
}

body.theme-luxury-dark .chat-thread .msg.theirs {
  background: rgba(15, 20, 30, 0.9);
  color: #f7efe1;
}

body.theme-luxury-dark .chat-thread__composer {
  background: rgba(214, 184, 121, 0.08);
  border-color: rgba(214, 184, 121, 0.24);
}

body.theme-luxury-dark .chat-thread__composer .btn {
  background: linear-gradient(135deg, rgba(214, 184, 121, 0.95), rgba(139, 107, 42, 0.9));
  color: #1b1407;
}

body.theme-luxury-dark .chat-thread__composer .btn:hover,
body.theme-luxury-dark .chat-thread__composer .btn:focus-visible {
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.65);
}

.chat-thread__typing {
  font-size: 0.85rem;
  color: var(--feed-muted-color);
  padding-left: 6px;
}

.chat-thread__empty {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--feed-muted-color);
  font-size: 1rem;
  padding: 24px 12px;
}

@media (max-width: 1200px) {
  .chat-card__shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-sidebar {
    order: 1;
  }

  .chat-thread {
    order: 2;
  }
}

@media (max-width: 960px) {
  body.chat-page {
    overflow: auto;
  }

  body.chat-page .page-layout {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  body.chat-page .chat-card {
    padding: 18px;
  }

  .chat-thread__composer {
    flex-direction: column;
  }

  .chat-thread__composer .file,
  .chat-thread__composer .btn {
    width: 100%;
    justify-content: center;
  }

  .msg__actions {
    opacity: 1;
    pointer-events: auto;
  }
}
