/* ==========================================================================
   4ADVS — Chat em Equipe (CSS)
   Design System Executivo: Neon Dourado, 3 Colunas, Glassmorphism e Realtime
   ========================================================================== */

/* ── Fixação Total do Chat (Zero Rolagem Externa) ────────────────────────── */
html:has(.eq-chat-page-root),
body:has(.eq-chat-page-root),
body.chat-equipe-active {
  overflow: hidden !important;
  height: 100vh !important;
}

body:has(.eq-chat-page-root) .main-content,
body.chat-equipe-active .main-content {
  overflow: hidden !important;
  padding: 4px 14px 4px 14px !important;
  height: calc(100vh - var(--header-height, 60px)) !important;
  max-height: calc(100vh - var(--header-height, 60px)) !important;
  display: flex !important;
  flex-direction: column !important;
}

body:has(.eq-chat-page-root) .bottom-tip-bar,
body.chat-equipe-active .bottom-tip-bar {
  display: none !important;
}

.eq-chat-page-root {
  width: 100%;
  max-width: 100% !important;
  height: 100% !important;
  flex: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.eq-chat-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  margin-bottom: 14px;
}

.eq-chat-breadcrumb .eq-bc-link {
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s ease;
}

.eq-chat-breadcrumb .eq-bc-link:hover {
  color: #e2e8f0;
}

.eq-chat-breadcrumb .eq-bc-chevron {
  width: 14px;
  height: 14px;
  color: #f59e0b;
}

.eq-chat-breadcrumb .eq-bc-active {
  color: #fbbf24;
  font-weight: 700;
}

/* ── Hero Banner Superior (Executivo Neon Dourado) ───────────────────────── */
.eq-chat-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #0d1728 0%, #09101d 100%);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 16px;
  padding: 18px 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  gap: 16px;
  flex-wrap: wrap;
}

.light-theme .eq-chat-hero-banner {
  background: #ffffff;
  border-color: rgba(202, 138, 4, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.eq-chat-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.eq-chat-hero-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
  color: #ffffff;
  flex-shrink: 0;
}

.eq-chat-hero-icon {
  width: 26px;
  height: 26px;
}

.eq-chat-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px 0;
  letter-spacing: -0.02em;
}

.light-theme .eq-chat-hero-title {
  color: #0f172a;
}

.eq-chat-hero-desc {
  font-size: 13.5px;
  color: #94a3b8;
  margin: 0;
}

.light-theme .eq-chat-hero-desc {
  color: #64748b;
}

.eq-chat-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eq-chat-btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.light-theme .eq-chat-btn-hero-secondary {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.eq-chat-btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.eq-chat-btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000000;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.eq-chat-btn-hero-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

/* ── Container Geral do Chat (3 Colunas) ─────────────────────────────────── */
.eq-chat-full-container {
  width: 100%;
  height: 100% !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.eq-chat-box {
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  height: 100% !important;
  flex: 1 !important;
  min-height: 0 !important;
  max-height: 100% !important;
  background: #080f1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.light-theme .eq-chat-box {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* ── Coluna 1: Lista de Conversas (Esquerda) ─────────────────────────────── */
.eq-chat-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  background: #080f1e;
  overflow: hidden;
}

.light-theme .eq-chat-sidebar {
  background: #f8fafc;
  border-right-color: #e2e8f0;
}

.eq-chat-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.light-theme .eq-chat-sidebar-header {
  border-bottom-color: #e2e8f0;
}

.eq-chat-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.light-theme .eq-chat-sidebar-title {
  color: #0f172a;
}

.eq-chat-sidebar-btn-new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000000;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  transition: all 0.2s ease;
}

.eq-chat-sidebar-btn-new:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.eq-chat-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.light-theme .eq-chat-tabs-bar {
  border-bottom-color: #e2e8f0;
}

.eq-chat-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.light-theme .eq-chat-tab-pill {
  color: #64748b;
}

.eq-chat-tab-pill:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.03);
}

.light-theme .eq-chat-tab-pill:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.eq-chat-tab-pill.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  font-weight: 600;
}

.eq-tab-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.light-theme .eq-tab-badge {
  background: #e2e8f0;
  color: #334155;
}

.eq-chat-tab-pill.active .eq-tab-badge {
  background: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-weight: 700;
}

.eq-chat-filter-btn {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.light-theme .eq-chat-filter-btn {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #64748b;
}

.eq-chat-filter-btn:hover {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.eq-chat-search-container {
  padding: 10px 14px;
}

.eq-chat-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.eq-chat-search-wrap i {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
}

.eq-chat-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-size: 12.5px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.light-theme .eq-chat-search-input {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.eq-chat-search-input:focus {
  border-color: #f59e0b;
  background: rgba(255, 255, 255, 0.06);
}

/* Lista de conversas */
.eq-chat-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eq-chat-conv-list::-webkit-scrollbar {
  width: 5px;
}

.eq-chat-conv-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.eq-chat-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.eq-chat-conv-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.light-theme .eq-chat-conv-item:hover {
  background: #f1f5f9;
}

.eq-chat-conv-item.active {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.12);
}

.light-theme .eq-chat-conv-item.active {
  background: rgba(202, 138, 4, 0.08);
  border-color: #ca8a04;
}

.eq-chat-conv-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.eq-chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.eq-chat-avatar img,
.eq-info-avatar img,
.eq-member-avatar img,
.eq-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.eq-chat-avatar.has-photo {
  border-color: rgba(245, 158, 11, 0.4);
  background: #111a2e;
}


.eq-chat-avatar.group {
  background: linear-gradient(135deg, #1e293b 0%, #172554 100%);
  color: #38bdf8;
}

.eq-chat-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #080f1e;
  background: #64748b;
  transition: background 0.2s ease;
}

.light-theme .eq-chat-status-dot {
  border-color: #ffffff;
}

.eq-chat-status-dot.status-online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.eq-chat-status-dot.status-ausente,
.eq-chat-status-dot.orange {
  background: #f59e0b;
}

.eq-chat-status-dot.status-ocupado {
  background: #ef4444;
}

.eq-chat-status-dot.status-offline {
  background: #64748b;
  box-shadow: none;
}

.eq-chat-conv-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.eq-chat-conv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.eq-chat-conv-name-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  min-width: 0;
}

.eq-chat-conv-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.light-theme .eq-chat-conv-name {
  color: #0f172a;
}

.eq-chat-role-pill {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.light-theme .eq-chat-role-pill {
  background: #e2e8f0;
  color: #475569;
}

.eq-chat-conv-time {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  flex-shrink: 0;
}

.eq-chat-conv-item.active .eq-chat-conv-time {
  color: #fbbf24;
}

.eq-chat-conv-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.eq-chat-conv-snippet {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.light-theme .eq-chat-conv-snippet {
  color: #64748b;
}

.eq-chat-unread-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f59e0b;
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(245, 158, 11, 0.4);
}

/* ── Rodapé e Dropup de Presença do Usuário ──────────────────────────────── */
.eq-chat-footer-wrapper {
  position: relative;
  background: #080f1e;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.light-theme .eq-chat-footer-wrapper {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

.eq-chat-sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease;
}

.eq-chat-sidebar-footer:hover {
  background: rgba(255, 255, 255, 0.04);
}

.light-theme .eq-chat-sidebar-footer:hover {
  background: #e2e8f0;
}

.eq-status-chevron-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform 0.22s ease, color 0.2s ease;
}

.eq-status-chevron-wrap.open {
  transform: rotate(180deg);
  color: #fbbf24;
}

/* Bolinha de status */
.eq-chat-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.eq-chat-pulse-dot.status-online,
.eq-chat-pulse-dot:not([class*="status-"]) {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: eqPulse 2s infinite ease-in-out;
}

.eq-chat-pulse-dot.status-ausente {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  animation: none;
}

.eq-chat-pulse-dot.status-ocupado {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: none;
}

.eq-chat-pulse-dot.status-offline {
  background: #64748b;
  box-shadow: none;
  animation: none;
}

/* Menu Dropup */
.eq-status-dropup-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 8px;
  right: 8px;
  background: linear-gradient(180deg, #0d1728 0%, #09101d 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.1);
  display: none;
  z-index: 100;
  animation: eqFadeIn 0.18s ease;
}

.light-theme .eq-status-dropup-menu {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.12);
}

.eq-status-dropup-menu.open {
  display: block;
}

.eq-status-dropup-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  padding: 4px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}

.light-theme .eq-status-dropup-header {
  color: #64748b;
  border-bottom-color: #e2e8f0;
}

.eq-status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eq-status-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.light-theme .eq-status-option:hover {
  background: #f1f5f9;
}

.eq-status-option.selected {
  background: rgba(245, 158, 11, 0.12);
}

.light-theme .eq-status-option.selected {
  background: #fef3c7;
}

.eq-status-dot-opt {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.eq-status-dot-opt.dot-online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.eq-status-dot-opt.dot-ausente {
  background: #f59e0b;
}

.eq-status-dot-opt.dot-ocupado {
  background: #ef4444;
}

.eq-status-dot-opt.dot-offline {
  background: #64748b;
}

.eq-status-opt-text {
  flex: 1;
}

.eq-status-opt-title {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
}

.light-theme .eq-status-opt-title {
  color: #0f172a;
}

.eq-status-opt-desc {
  font-size: 10.5px;
  color: #64748b;
}

.eq-status-opt-check {
  width: 14px;
  height: 14px;
  color: #fbbf24;
}

.eq-chat-online-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-weight: 500;
  font-size: 12.5px;
}

.light-theme .eq-chat-online-status {
  color: #0f172a;
}

@keyframes eqPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ── Coluna 2: Chat Canvas Central (Thread e Vazio) ──────────────────────── */
.eq-chat-main {
  display: flex;
  flex-direction: column;
  background: #070d18;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.light-theme .eq-chat-main {
  background: #f8fafc;
  border-right-color: #e2e8f0;
}

/* Estado Vazio (Nenhuma Conversa Selecionada) */
.eq-chat-no-selection {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.eq-chat-neon-bubbles {
  margin-bottom: 22px;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.2));
}

.eq-chat-no-selection-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}

.light-theme .eq-chat-no-selection-title {
  color: #0f172a;
}

.eq-chat-no-selection-desc {
  font-size: 13.5px;
  color: #94a3b8;
  max-width: 440px;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.light-theme .eq-chat-no-selection-desc {
  color: #64748b;
}

/* Cabeçalho da Conversa Ativa */
.eq-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 20, 38, 0.5);
  backdrop-filter: blur(8px);
}

.light-theme .eq-chat-header {
  background: #ffffff;
  border-bottom-color: #e2e8f0;
}

.eq-chat-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eq-chat-header-name {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.light-theme .eq-chat-header-name {
  color: #0f172a;
}

.eq-chat-header-role-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-weight: 600;
}

.eq-chat-header-status {
  font-size: 12px;
  color: #94a3b8;
}

/* Rolagem de Mensagens */
.eq-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eq-chat-messages::-webkit-scrollbar {
  width: 5px;
}

.eq-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.eq-chat-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 72%;
  position: relative;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Agrupamento de mensagens consecutivas do mesmo remetente */
.eq-chat-msg-row.consecutive {
  margin-top: -6px;
}

/* Mensagens Enviadas pelo usuário logado (à direita) */
.eq-chat-msg-row.outgoing,
.eq-chat-msg-row.out {
  align-self: flex-end;
  margin-left: auto;
  flex-direction: row-reverse;
}

/* Mensagens Recebidas (à esquerda) */
.eq-chat-msg-row.incoming,
.eq-chat-msg-row.in {
  align-self: flex-start;
  margin-right: auto;
  flex-direction: row;
}

/* Espaçador alinhado para mensagens consecutivas recebidas sem avatar repetido */
.eq-chat-avatar-spacer {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* Balão Base */
.eq-chat-msg-bubble,
.eq-chat-bubble {
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

/* Mensagens enviadas pelo usuário logado:
   Fundo azul-petróleo #172B43, com borda sutil #294565 */
.eq-chat-msg-row.outgoing .eq-chat-msg-bubble,
.eq-chat-msg-row.outgoing .eq-chat-bubble,
.eq-chat-msg-row.out .eq-chat-msg-bubble,
.eq-chat-msg-row.out .eq-chat-bubble {
  background-color: #172B43 !important;
  border: 1px solid #294565 !important;
  color: #F1F5FC !important;
  border-bottom-right-radius: 4px;
}

.light-theme .eq-chat-msg-row.outgoing .eq-chat-msg-bubble,
.light-theme .eq-chat-msg-row.outgoing .eq-chat-bubble,
.light-theme .eq-chat-msg-row.out .eq-chat-msg-bubble,
.light-theme .eq-chat-msg-row.out .eq-chat-bubble {
  background-color: #1e3a5f !important;
  border: 1px solid #294565 !important;
  color: #ffffff !important;
  border-bottom-right-radius: 4px;
}

/* Mensagens recebidas:
   Fundo cinza-azulado #151F30, com borda discreta #273449 */
.eq-chat-msg-row.incoming .eq-chat-msg-bubble,
.eq-chat-msg-row.incoming .eq-chat-bubble,
.eq-chat-msg-row.in .eq-chat-msg-bubble,
.eq-chat-msg-row.in .eq-chat-bubble {
  background-color: #151F30 !important;
  border: 1px solid #273449 !important;
  color: #F1F5FC !important;
  border-bottom-left-radius: 4px;
}

.light-theme .eq-chat-msg-row.incoming .eq-chat-msg-bubble,
.light-theme .eq-chat-msg-row.incoming .eq-chat-bubble,
.light-theme .eq-chat-msg-row.in .eq-chat-msg-bubble,
.light-theme .eq-chat-msg-row.in .eq-chat-bubble {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
  border-bottom-left-radius: 4px;
}

/* Texto das mensagens: branco suave #F1F5FC, garantindo excelente legibilidade */
.eq-chat-msg-text {
  color: #F1F5FC !important;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Remoção definitiva de nomes repetidos no histórico das conversas */
.eq-chat-msg-sender {
  display: none !important;
}

/* Horários: tom secundário discreto #8292AA */
.eq-chat-msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 11px;
  color: #8292AA !important;
  margin-top: 4px;
  align-self: flex-end;
  user-select: none;
}

.eq-chat-msg-meta span {
  color: #8292AA !important;
  font-size: 11px;
}

.eq-chat-msg-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

.eq-chat-msg-status i {
  width: 13px;
  height: 13px;
}


/* Barra de Envio */
.eq-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 20, 38, 0.6);
}

.light-theme .eq-chat-input-bar {
  border-top-color: #e2e8f0;
  background: #ffffff;
}

.eq-chat-input-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.eq-chat-input-icon-btn:hover {
  color: #fbbf24;
  background: rgba(255, 255, 255, 0.05);
}

.eq-chat-textarea-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0 12px;
  transition: all 0.2s ease;
}

.light-theme .eq-chat-textarea-wrap {
  background: #ffffff;
  border-color: #cbd5e1;
}

.eq-chat-textarea-wrap:focus-within {
  border-color: #f59e0b;
  background: rgba(255, 255, 255, 0.06);
}

.eq-chat-textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: #f8fafc;
  font-size: 13px;
  resize: none;
  outline: none;
  padding: 10px 0;
  line-height: 1.4;
  font-family: inherit;
}

.light-theme .eq-chat-textarea {
  color: #0f172a;
}

.eq-chat-btn-send {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.eq-chat-btn-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
}

.eq-chat-btn-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Coluna 3: Painel Lateral de Informações e Recursos (Direita) ────────── */
.eq-chat-right-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: #080f1e;
  overflow-y: auto;
}

.light-theme .eq-chat-right-panel {
  background: #f8fafc;
}

.eq-panel-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.light-theme .eq-panel-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

.eq-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.light-theme .eq-panel-header {
  color: #0f172a;
  border-bottom-color: #e2e8f0;
}

.eq-panel-body {
  padding: 16px 14px;
}

/* Info Estado Vazio */
.eq-info-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eq-info-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  margin-bottom: 12px;
}

.light-theme .eq-info-empty-icon {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.eq-info-empty-title {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.light-theme .eq-info-empty-title {
  color: #0f172a;
}

.eq-info-empty-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* Info Estado Ativo */
.eq-info-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eq-info-avatar-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
}

.eq-info-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1e293b;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(245, 158, 11, 0.4);
  overflow: hidden;
  position: relative;
  user-select: none;
}

.eq-info-avatar.has-photo {
  border-color: rgba(245, 158, 11, 0.6);
  background: #111a2e;
}


.eq-info-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.light-theme .eq-info-name {
  color: #0f172a;
}

.eq-info-role-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-weight: 600;
  margin-bottom: 14px;
}

.eq-info-meta-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
  text-align: left;
}

.eq-info-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.light-theme .eq-info-meta-item {
  background: #f1f5f9;
}

/* ── Card Informações (Accordion Interativo com Recolhimento Suave) ──────── */
.eq-info-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.light-theme .eq-info-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

.eq-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.eq-info-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.light-theme .eq-info-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.light-theme .eq-info-header:hover {
  background: #f1f5f9;
}

.eq-info-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.light-theme .eq-info-header-left {
  color: #0f172a;
}

.eq-info-chevron-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.eq-info-header:hover .eq-info-chevron-wrap {
  color: #fbbf24;
}

.light-theme .eq-info-header:hover .eq-info-chevron-wrap {
  color: #0f172a;
}

.eq-info-card.open .eq-info-chevron-wrap {
  transform: rotate(180deg);
  color: #fbbf24;
}

.eq-info-card:not(.open) .eq-info-header {
  border-bottom-color: transparent;
}

.eq-info-accordion-body {
  padding: 0 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.3s ease;
  pointer-events: none;
}

.eq-info-card.open .eq-info-accordion-body {
  padding: 16px 14px;
  max-height: 600px;
  opacity: 1;
  pointer-events: auto;
}

/* Quando Informações está recolhido, o card de Membros ganha mais espaço vertical útil */
.eq-info-card:not(.open) + .eq-members-card.open .eq-members-accordion-body,
.eq-info-card:not(.open) ~ .eq-members-card.open .eq-members-accordion-body {
  max-height: calc(100vh - 200px);
}

.eq-info-card:not(.open) + .eq-members-card.open .eq-members-list,
.eq-info-card:not(.open) ~ .eq-members-card.open .eq-members-list {
  max-height: calc(100vh - 270px);
}

/* ── Card Membros da Equipe (Accordion, Busca & Ação Conversar) ─────────── */
.eq-members-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: all 0.25s ease;
}

.light-theme .eq-members-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

.eq-members-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.eq-members-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.light-theme .eq-members-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.eq-members-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.light-theme .eq-members-header-left {
  color: #0f172a;
}

.eq-members-count-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 12px;
}

.eq-members-chevron-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.eq-members-card.open .eq-members-chevron-wrap {
  transform: rotate(180deg);
  color: #fbbf24;
}

.eq-members-accordion-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  display: flex;
  flex-direction: column;
}

.eq-members-card.open .eq-members-accordion-body {
  max-height: 520px;
  opacity: 1;
}

/* ── Barra de Pesquisa de Membros (Nome ou Cargo) ─────────────────────────── */
.eq-members-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 6px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.eq-members-search-wrap:focus-within {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.light-theme .eq-members-search-wrap {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.eq-members-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 11.5px;
  color: #f1f5f9;
}

.eq-members-search-input::placeholder {
  color: #64748b;
}

.light-theme .eq-members-search-input {
  color: #0f172a;
}

/* ── Listagem de Membros ─────────────────────────────────────────────────── */
.eq-members-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 380px;
  padding: 4px 6px 8px;
}

.eq-members-empty {
  padding: 24px 12px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

.eq-member-item {
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background 0.15s ease;
}

.eq-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.eq-member-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.light-theme .eq-member-row:hover {
  background: #f1f5f9;
}

.eq-member-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.eq-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.eq-member-avatar.has-photo {
  border-color: rgba(245, 158, 11, 0.5);
  background: #111a2e;
}


.eq-member-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eq-member-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.light-theme .eq-member-name {
  color: #0f172a;
}

/* Etiqueta / Badge de Cargo */
.eq-member-role-etiqueta {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 4px;
  padding: 1px 6px;
  width: fit-content;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.light-theme .eq-member-role-etiqueta {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}

.eq-member-chevron-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.eq-member-item.expanded .eq-member-chevron-btn {
  transform: rotate(180deg);
  color: #fbbf24;
}

/* ── Ação Desdobrável: Conversar com o Contato ───────────────────────────── */
.eq-member-action-drawer {
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  padding: 0 8px 8px;
}

.eq-btn-iniciar-conversa {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.24) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.eq-btn-iniciar-conversa:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000000;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}

/* Status Conectado Supabase */
.eq-realtime-status-card {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.light-theme .eq-realtime-status-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

.eq-realtime-status-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
}

.light-theme .eq-realtime-status-title {
  color: #0f172a;
}

.eq-realtime-status-sub {
  font-size: 11px;
  color: #64748b;
}

/* ── Modal de Nova Conversa ──────────────────────────────────────────────── */
.eq-chat-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: eqFadeIn 0.2s ease;
}

@keyframes eqFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.eq-chat-modal {
  width: 100%;
  max-width: 480px;
  background: #0B1426;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.light-theme .eq-chat-modal {
  background: #ffffff;
  border-color: #cbd5e1;
}

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

.eq-chat-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.light-theme .eq-chat-modal-title {
  color: #0f172a;
}

.eq-chat-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.eq-chat-modal-close:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.eq-chat-modal-body {
  padding: 16px 20px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eq-chat-member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}

.eq-chat-member-item:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
}

/* ── Responsividade ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .eq-chat-box {
    grid-template-columns: 300px 1fr;
  }
  .eq-chat-right-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .eq-chat-box {
    grid-template-columns: 1fr;
  }
  .eq-chat-main {
    display: none;
  }
  .eq-chat-box.mobile-thread-open .eq-chat-sidebar {
    display: none;
  }
  .eq-chat-box.mobile-thread-open .eq-chat-main {
    display: flex;
  }
}

/* ── Lixeira e Ações de Exclusão nas Abas ─────────────────────────────────── */
.eq-chat-trash-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s ease;
}

.eq-chat-trash-trigger-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: scale(1.05);
}

.light-theme .eq-chat-trash-trigger-btn {
  border-color: #cbd5e1;
  color: #64748b;
}

.light-theme .eq-chat-trash-trigger-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* ── Barra Ativa de Exclusão em Lote ─────────────────────────────────────── */
.eq-chat-delete-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border-bottom: 1px solid rgba(239, 68, 68, 0.25);
  gap: 10px;
  animation: eqFadeIn 0.2s ease;
}

.light-theme .eq-chat-delete-bar {
  background: #fef2f2;
  border-bottom-color: #fecaca;
}

.eq-chat-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #f87171;
  cursor: pointer;
  user-select: none;
}

.eq-chat-delete-count {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 500;
}

.light-theme .eq-chat-delete-count {
  color: #475569;
}

.eq-chat-delete-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eq-chat-btn-cancel-delete {
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.eq-chat-btn-cancel-delete:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.light-theme .eq-chat-btn-cancel-delete {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.eq-chat-btn-confirm-delete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
}

.eq-chat-btn-confirm-delete:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
}

.eq-chat-btn-confirm-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ── Checkbox Customizado Neon ───────────────────────────────────────────── */
.eq-chat-custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
  flex-shrink: 0;
  margin: 0;
}

.light-theme .eq-chat-custom-checkbox {
  background: #ffffff;
  border-color: #94a3b8;
}

.eq-chat-custom-checkbox:checked {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.eq-chat-custom-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.eq-chat-checkbox-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.eq-chat-conv-item.in-delete-mode {
  padding-left: 12px;
}

/* ── Modal Executivo de Confirmação (Card Nosso - Zero "localhost diz") ───── */
.eq-chat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: eqFadeIn 0.2s ease;
}

.eq-chat-modal-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #0d1728 0%, #080f1e 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 18px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(239, 68, 68, 0.15);
  animation: eqModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.light-theme .eq-chat-modal-card {
  background: #ffffff;
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.eq-confirm-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.eq-confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.light-theme .eq-confirm-title {
  color: #0f172a;
}

.eq-confirm-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0 0 24px;
}

.light-theme .eq-confirm-desc {
  color: #64748b;
}

.eq-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.eq-confirm-btn-cancel {
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.eq-confirm-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.light-theme .eq-confirm-btn-cancel {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.eq-confirm-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
}

.eq-confirm-btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

@keyframes eqFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes eqModalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Cards de Anexos no Chat ─────────────────────────────────────────────── */
.eq-chat-anexo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 4px;
  max-width: 320px;
  transition: all 0.2s ease;
}

.outgoing .eq-chat-anexo-card {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 0, 0, 0.2);
}

.eq-chat-anexo-card.img-card {
  display: block;
  padding: 6px;
  max-width: 260px;
}

.eq-anexo-img-link {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.eq-anexo-thumbnail {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: transform 0.2s ease;
}

.eq-anexo-thumbnail:hover {
  transform: scale(1.02);
}

.eq-anexo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 2px;
  font-size: 11px;
}

.eq-anexo-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eq-anexo-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eq-anexo-nome {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq-anexo-size {
  font-size: 10.5px;
  color: #94a3b8;
}

.eq-anexo-btn-download {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.eq-anexo-btn-download:hover {
  background: #f59e0b;
  color: #000;
  transform: translateY(-1px);
}

/* ── Pills e Badges de Status do Contato (Online / Ausente / Ocupado / Offline) */
.eq-conv-status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: capitalize;
}

.eq-conv-status-pill.status-online {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.eq-conv-status-pill.status-ausente {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.eq-conv-status-pill.status-ocupado {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.eq-conv-status-pill.status-offline {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.eq-info-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  margin-bottom: 12px;
}

.eq-info-status-badge.status-online {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.eq-info-status-badge.status-ausente {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.eq-info-status-badge.status-ocupado {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.eq-info-status-badge.status-offline {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}
