/* ==========================================================================
   RMATIAS LABS • DESIGN SYSTEM (RM FLOW)
   Estética Técnica: Deep Obsidian, Circuit Blueprint & Tech Icy-Blue
   ========================================================================== */

:root {
  /* 1. FUNDOS: Deep Obsidian / Ink & Steel / Graphite */
  --bg-app: #090A0C;
  --bg-main: #090A0C;
  --bg-sidebar: #0F1115;
  --bg-panel: #16191E;
  --bg-panel-hover: #1B1F26;
  --bg-card: #16191E;
  --bg-elevated: #20242B;
  --bg-input: #12151A;

  /* 2. BORDAS: Circuit Blueprint Lines (1px sutis) */
  --border-subtle: #1A202C;
  --border-medium: #2D3748;
  --border-focus: #38BDF8;

  /* 3. TEXTO & LEITURA: Platinum */
  --text-main: #E2E8F0;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  /* 4. COR DE DESTAQUE: Tech Icy-Blue (#2B6CB0 a #38BDF8) */
  --primary: #38BDF8;
  --primary-hover: #0EA5E9;
  --primary-dark: #2B6CB0;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --accent: #38BDF8;

  /* 5. STATUS DO SISTEMA */
  --emerald: #10B981;
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.25);

  --amber: #F59E0B;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --amber-border: rgba(245, 158, 11, 0.25);

  --rose: #EF4444;
  --rose-bg: rgba(239, 68, 68, 0.12);
  --rose-border: rgba(239, 68, 68, 0.25);

  --purple: #8B5CF6;
  --purple-bg: rgba(139, 92, 246, 0.15);

  /* 6. SOMBRAS E PROFUNDIDADE */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.2);

  /* 7. CANTOS SUAVES & ARQUITETURA MODERNA */
  --radius-sm: 4px;
  --radius-md: 7px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  /* 8. TIPOGRAFIA DEV & LABS: Inter + JetBrains Mono */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* 9. ELEMENTOS ESPECÍFICOS DE TEMA */
  --dot-color: rgba(255, 255, 255, 0.04);
  --chat-bg-gradient: radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.25), transparent 70%);
  --client-bubble-bg: #16191E;
  --client-bubble-text: #E2E8F0;
  --agent-bubble-bg: linear-gradient(135deg, #1E40AF, #2563EB);
  --agent-bubble-text: #FFFFFF;
  --hub-hero-bg: linear-gradient(135deg, #16191E 0%, #0F1115 100%);
  --hub-card-bg: linear-gradient(145deg, #16191E 0%, #20242B 100%);
}

/* ==========================================================================
   TEMA CLARO (AMIGÁVEL, LIMPO, CONFORTÁVEL & FLUÍDO)
   ========================================================================== */
[data-theme="light"] {
  /* 1. FUNDOS: Off-White Moderno e Acolhedor */
  --bg-app: #F8FAFC;
  --bg-main: #F1F5F9;
  --bg-sidebar: #FFFFFF;
  --bg-panel: #FFFFFF;
  --bg-panel-hover: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --bg-input: #FFFFFF;

  /* 2. BORDAS: Delicadas, Nítidas e Modernas */
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-focus: #0284C7;

  /* 3. TEXTO & LEITURA: Slate Profundo com Alto Conforto */
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dim: #64748B;

  /* 4. COR DE DESTAQUE: Tech Sky / Ocean Blue */
  --primary: #0284C7;
  --primary-hover: #0369A1;
  --primary-dark: #075985;
  --primary-glow: rgba(2, 132, 199, 0.2);
  --accent: #0284C7;

  /* 5. STATUS DO SISTEMA NO TEMA CLARO */
  --emerald: #059669;
  --emerald-bg: rgba(5, 150, 105, 0.1);
  --emerald-border: rgba(5, 150, 105, 0.25);

  --amber: #D97706;
  --amber-bg: rgba(217, 119, 6, 0.1);
  --amber-border: rgba(217, 119, 6, 0.25);

  --rose: #DC2626;
  --rose-bg: rgba(220, 38, 38, 0.1);
  --rose-border: rgba(220, 38, 38, 0.25);

  --purple: #7C3AED;
  --purple-bg: rgba(124, 58, 237, 0.1);

  /* 6. SOMBRAS AMIGÁVEIS COM DIFUSÃO SUAVE */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);

  /* 7. ELEMENTOS ESPECÍFICOS DO TEMA CLARO */
  --dot-color: rgba(15, 23, 42, 0.035);
  --chat-bg-gradient: radial-gradient(circle at 50% 20%, rgba(226, 232, 240, 0.55), transparent 70%);
  --client-bubble-bg: #FFFFFF;
  --client-bubble-text: #0F172A;
  --agent-bubble-bg: linear-gradient(135deg, #0284C7, #0369A1);
  --agent-bubble-text: #FFFFFF;
  --hub-hero-bg: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  --hub-card-bg: linear-gradient(145deg, #FFFFFF 0%, #F1F5F9 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2D3748;
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: #4A5568;
}

/* ==========================================================================
   TOP BAR (GLOBAL HEADER • RMATIAS LABS)
   ========================================================================== */
.top-header {
  height: 62px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 40;
  user-select: none;
  gap: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-sizing: border-box;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-rm-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090A0C;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-rm-logo-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
}

.brand-rm-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.brand-solution-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.brand-title .platform-tag {
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

/* Header Anti-Ban Indicator */
.antiban-shield {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--emerald-border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #34D399;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.header-center-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
}

.stat-pill strong {
  color: var(--text-main);
  font-weight: 700;
}

.stat-pill.waiting strong {
  color: var(--amber);
}

.stat-pill.active strong {
  color: #60A5FA;
}

/* Header Right - Operator & Connection */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.whatsapp-status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-panel);
  color: var(--text-main);
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
}

.whatsapp-status-btn:hover {
  background: var(--bg-panel-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.whatsapp-status-btn:active {
  transform: scale(0.97);
}

.whatsapp-status-btn.connected {
  border-color: var(--emerald-border);
  color: #34D399;
  background: var(--emerald-bg);
}

.whatsapp-status-btn.qrcode {
  border-color: var(--amber-border);
  color: #FBBF24;
  background: var(--amber-bg);
  animation: pulseAmber 1.5s infinite;
}

@keyframes pulseAmber {
  0%, 100% { border-color: var(--amber-border); }
  50% { border-color: rgba(245, 158, 11, 0.8); }
}

/* Botão de Notificações Desktop e Mobile */
.notification-bell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background: var(--bg-panel);
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
}

.notification-bell-btn:hover {
  background: var(--bg-panel-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.notification-bell-btn:active {
  transform: scale(0.97);
}

.notification-bell-btn.prompt {
  border-color: rgba(59, 130, 246, 0.4);
  color: #60A5FA;
  background: rgba(59, 130, 246, 0.08);
  animation: pulseBlueRing 2.5s infinite;
}

@keyframes pulseBlueRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(59, 130, 246, 0); }
}

.notification-bell-btn.granted {
  border-color: var(--emerald-border);
  color: #34D399;
  background: var(--emerald-bg);
}

.notification-bell-btn.denied {
  border-color: rgba(239, 68, 68, 0.3);
  color: #F87171;
}

.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60A5FA;
  display: inline-block;
  flex-shrink: 0;
}

.notification-bell-btn.granted .notification-dot {
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.notification-bell-btn.denied .notification-dot {
  background: #EF4444;
}

/* ==========================================================================
   BOTÃO DE ALTERNÂNCIA DE TEMA (CLARO / ESCURO)
   ========================================================================== */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-theme-toggle:hover {
  background: var(--bg-panel-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-theme-toggle:active {
  transform: scale(0.96);
}

/* Ícones dinâmicos de sol / lua */
:root:not([data-theme="light"]) .theme-icon-moon {
  display: none;
}
:root:not([data-theme="light"]) .theme-icon-sun {
  display: inline-block;
  color: #FBBF24;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}
[data-theme="light"] .theme-icon-moon {
  display: inline-block;
  color: #6366F1;
}

.operator-switch-box {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.operator-switch-box:hover {
  background: var(--bg-panel-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.operator-switch-box:active {
  transform: scale(0.97);
}

.operator-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3B82F6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.operator-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.operator-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operator-role {
  font-size: 9.5px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ==========================================================================
   MAIN WORKSPACE (FLEXBOX DINÂMICO & RESPONSIVO)
   ========================================================================== */
.main-workspace {
  display: flex;
  flex-direction: row;
  width: 100%;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 62px);
  position: relative;
}

/* ==========================================================================
   LEFT COLUMN: INBOX & DISTRIBUTION QUEUE
   ========================================================================== */
.inbox-column {
  width: 320px;
  min-width: 280px;
  max-width: 350px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.25s ease;
}

/* Tab Navigation (Fila, Meus, Todos, Resolvidos) */
.inbox-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.inbox-nav-tabs::-webkit-scrollbar {
  display: none;
}

.inbox-tab-btn {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.inbox-tab-btn:hover {
  background: var(--bg-panel);
  color: var(--text-main);
  border-color: var(--border-subtle);
  transform: translateY(-1px);
}

.inbox-tab-btn:active {
  transform: scale(0.96);
}

.inbox-tab-btn.active {
  background: var(--bg-panel);
  color: #38BDF8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Destaque Visual Especial: Aba 'Meus' */
.inbox-tab-btn.tab-my-highlight {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(37, 99, 235, 0.24) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.48) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.22);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.inbox-tab-btn.tab-my-highlight:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28) 0%, rgba(37, 99, 235, 0.38) 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.42);
  transform: translateY(-1px);
}

.inbox-tab-btn.tab-my-highlight.active {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  border-color: #bae6fd !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.55), 0 0 8px rgba(56, 189, 248, 0.4) !important;
}

.inbox-tab-btn.tab-my-highlight .tab-badge.my {
  background: #38bdf8 !important;
  color: #031124 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

.inbox-tab-btn.tab-my-highlight.active .tab-badge.my {
  background: #ffffff !important;
  color: #0284c7 !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.tab-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
}

.tab-badge.waiting {
  background: var(--amber);
  color: #000;
}

.tab-badge.my {
  background: var(--primary);
  color: #fff;
}

.tab-badge.neutral {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.tab-badge.purple {
  background: rgba(139, 92, 246, 0.22);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

/* Filters & Search */
.inbox-search-bar {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
}

.search-input-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.search-input-wrap input:focus {
  border-color: var(--primary);
}

.dept-filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
}

/* Conversations List */
.conversations-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conversation-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.conversation-card:hover {
  background: var(--bg-panel-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.conversation-card.active {
  background: var(--bg-panel-hover);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-sm);
}

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

.card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #334155, #1E293B);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border-medium);
}

.card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-contact-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-timestamp {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.card-preview-msg {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  gap: 6px;
}

.card-operator-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-operator-badge.unassigned {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.card-operator-badge.is-me {
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 700;
}

.card-unread-pill {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

/* Empty Inbox State */
.inbox-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-dim);
  gap: 12px;
}

.inbox-empty-box svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

/* ==========================================================================
   CENTER COLUMN: CHAT WORKSPACE
   ========================================================================== */
.chat-column {
  flex: 1 1 0%;
  min-width: 0;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Chat Header */
.chat-header {
  height: 62px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  gap: 12px;
  z-index: 10;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.chat-contact-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
  min-width: 0;
}

.chat-contact-info:hover {
  background-color: var(--bg-panel);
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-contact-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-contact-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.chat-contact-phone {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background: var(--bg-panel);
  color: var(--text-main);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.chat-action-btn:hover {
  background: var(--bg-panel-hover);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.chat-action-btn:active {
  transform: scale(0.96);
}

.chat-action-btn.assign-btn {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38BDF8;
}

.chat-action-btn.assign-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38BDF8;
}

.chat-action-btn.resolve-btn {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: #34D399;
}

.chat-action-btn.resolve-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10B981;
}

.chat-action-btn.crm-toggle-btn {
  background: var(--bg-panel);
  border-color: var(--border-medium);
  color: var(--text-main);
}

.chat-action-btn.crm-toggle-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--primary);
  color: #38BDF8;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background: var(--bg-panel);
  color: var(--text-main);
  transition: all 0.15s ease;
}

.btn-action:hover {
  background: var(--bg-panel-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Messages History Area */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.2), transparent 70%);
}

.date-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.date-divider span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-panel);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Message Bubbles */
.message-row {
  display: flex;
  flex-direction: column;
  max-width: 68%;
  animation: fadeInMsg 0.2s ease-out;
}

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

.message-row.client {
  align-self: flex-start;
}

.message-row.agent {
  align-self: flex-end;
}

.message-row.internal-note {
  align-self: center;
  max-width: 85%;
  width: 100%;
}

.bubble {
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.message-row.client .bubble {
  background: var(--client-bubble-bg);
  color: var(--client-bubble-text);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 3px;
  box-shadow: var(--shadow-sm);
}

.message-row.agent .bubble {
  background: var(--agent-bubble-bg);
  color: var(--agent-bubble-text);
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

/* Internal Team Note Bubble */
.message-row.internal-note .bubble {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.internal-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  padding-bottom: 4px;
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.75;
  font-family: var(--font-mono);
}

.bubble-author {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   RESPOSTA CITADA (REPLY & QUOTES NO CHAT)
   ========================================================================== */
.message-row {
  position: relative;
}

.message-actions-overlay {
  position: absolute;
  top: -12px;
  right: 12px;
  display: none;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  padding: 2px 6px;
  box-shadow: var(--shadow-md);
  z-index: 10;
  animation: fadeInMsg 0.15s ease-out;
}

.message-row:hover .message-actions-overlay {
  display: flex;
}

.msg-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.msg-action-btn:hover {
  background: var(--bg-panel-hover);
  color: var(--primary);
  transform: scale(1.08);
}

/* Balão citado dentro da mensagem */
.quoted-preview-bubble {
  background: rgba(0, 0, 0, 0.14);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

[data-theme="light"] .quoted-preview-bubble {
  background: rgba(0, 0, 0, 0.04);
}

.quoted-preview-bubble:hover {
  background: rgba(0, 0, 0, 0.22);
}

.quoted-author {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.quoted-text {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* Barra de resposta acima do composer */
.replying-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 4px;
  box-shadow: var(--shadow-sm);
  animation: slideDownReply 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.replying-content {
  flex: 1;
  min-width: 0;
}

.replying-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 2px;
}

.replying-snippet {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.replying-cancel-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.replying-cancel-btn:hover {
  color: var(--rose);
  background: var(--rose-bg);
}

/* Barra de Pesquisa dentro do Chat */
.chat-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
  animation: slideDownReply 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.chat-search-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.chat-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.chat-search-count {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  white-space: nowrap;
}

.chat-search-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.chat-search-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-panel-hover);
}

/* Botão Flutuante de Rolar para Baixo */
.btn-scroll-bottom {
  position: absolute;
  right: 24px;
  bottom: 84px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 15;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-scroll-bottom:hover {
  transform: scale(1.1);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-scroll-bottom:active {
  transform: scale(0.95);
}

.scroll-unread-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* Chat Input Bar */
.chat-composer-bar {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-toggle-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.mode-toggle-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.mode-toggle-btn.active.msg-mode {
  background: var(--primary);
  color: #FFFFFF;
}

.mode-toggle-btn.active.note-mode {
  background: var(--amber);
  color: #000000;
}

.quick-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tool {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-tool:hover {
  background: var(--bg-panel-hover);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.composer-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.composer-textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-main);
  resize: none;
  min-height: 44px;
  max-height: 140px;
  outline: none;
  font-family: var(--font-sans);
  line-height: 1.4;
  transition: border-color 0.2s;
}

.composer-textarea:focus {
  border-color: var(--primary);
}

.composer-textarea.note-active {
  border-color: var(--amber-border);
  background: rgba(245, 158, 11, 0.04);
}

.composer-send-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.composer-send-btn:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-glow);
  transform: scale(1.02);
}

.composer-send-btn.note-btn {
  background: var(--amber);
  color: #000;
}

.composer-safe-badge {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* No Chat Selected State */
.no-chat-selected {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}

.no-chat-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

/* ==========================================================================
   RIGHT COLUMN: CRM DETAILS & CONTACT DRAWER
   ========================================================================== */
.crm-column {
  width: 330px;
  min-width: 300px;
  max-width: 360px;
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px;
  gap: 14px;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

/* CRM Top Bar com botão fechar */
.crm-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.crm-top-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.crm-top-title svg {
  color: #38BDF8;
}

.crm-close-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.crm-close-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: #EF4444;
}

/* CRM Hero Card */
.crm-hero-card {
  background: linear-gradient(145deg, var(--bg-panel) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.crm-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563EB, #38BDF8);
}

.crm-avatar-ring {
  position: relative;
  cursor: pointer;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.6), rgba(37, 99, 235, 0.2));
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.crm-avatar-ring:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.35);
}

.crm-big-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  overflow: hidden;
}

.crm-big-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crm-contact-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
  word-break: break-word;
  max-width: 100%;
}

.crm-phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  padding: 3px 10px;
  max-width: 100%;
}

.crm-phone-link {
  font-size: 12px;
  color: #38BDF8;
  text-decoration: none;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.crm-phone-link:hover {
  text-decoration: underline;
}

.crm-copy-phone-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.crm-copy-phone-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.crm-copy-phone-btn.copied {
  color: #10B981 !important;
}

/* CRM Section Cards */
.crm-section-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crm-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
}

.crm-data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  gap: 8px;
}

.crm-data-label {
  color: var(--text-dim);
  font-size: 12px;
}

.crm-data-value {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.crm-status-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #93C5FD;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-badge .remove-tag {
  cursor: pointer;
  opacity: 0.6;
}
.tag-badge .remove-tag:hover {
  opacity: 1;
}

.add-tag-box {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.add-tag-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
}

.btn-add-tag {
  background: var(--primary);
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.crm-notes-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.customer-notes-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text-main);
  min-height: 80px;
  resize: vertical;
  outline: none;
  font-family: var(--font-sans);
  line-height: 1.45;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.customer-notes-textarea:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

/* ==========================================================================
   MODALS (QR CODE, TRANSFERÊNCIA, RESPOSTAS RÁPIDAS)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 520px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 18px;
}
.modal-close-btn:hover {
  color: #fff;
}

/* QR Code Display Container */
.qrcode-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 10px 0;
  min-height: 280px;
}

.qrcode-frame img {
  width: 250px;
  height: 250px;
  object-fit: contain;
}

.qrcode-instructions {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.qrcode-instructions ol {
  padding-left: 20px;
  margin-top: 8px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

/* Quick Replies Dropdown / Popover */
.quick-replies-popover {
  position: absolute;
  bottom: 80px;
  left: 20px;
  width: 380px;
  max-height: 320px;
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.quick-replies-popover.active {
  display: flex;
}

.popover-header {
  padding: 10px 14px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popover-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popover-item {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s;
}

.popover-item:hover {
  background: var(--bg-panel-hover);
}

.popover-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.popover-item-snippet {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInToast 0.25s ease;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-color: var(--emerald-border); color: #34D399; }
.toast.error { border-color: var(--rose-bg); color: #F87171; }
.toast.info { border-color: rgba(96, 165, 250, 0.4); color: #60A5FA; }

/* ==========================================================================
   ESTILOS ADICIONAIS: GESTÃO ÁGIL DE EQUIPE & WHATSAPP PERSISTENTE
   ========================================================================== */
.btn-action.secondary-glow {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93C5FD;
}
.btn-action.secondary-glow:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: #60A5FA;
  color: #FFFFFF;
}

.modal-card-lg {
  max-width: 680px;
  width: 95%;
}

.modal-status-badge {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
}

.persistence-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--emerald-border);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  color: #E2E8F0;
  font-size: 12px;
  line-height: 1.4;
}

.persistence-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.btn-action.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #F87171;
}
.btn-action.danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #EF4444;
  color: #FFFFFF;
}

/* Abas de Equipe */
.team-modal-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-panel);
}

.team-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.team-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.team-tab-btn.active {
  color: #60A5FA;
  background: var(--bg-card);
  border-color: var(--border-subtle);
  border-bottom: 2px solid #3B82F6;
}

/* Grid de Operadores */
.operators-grid-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.operator-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.18s ease;
}

.operator-user-card:hover {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.03);
}

.operator-user-card.is-active {
  border-color: #3B82F6;
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.15);
}

.operator-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.operator-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.operator-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.operator-card-sub {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.operator-badge-tag {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.operator-actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-danger {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #EF4444;
}

/* Formulário de Criação */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Seletor de Paleta */
.avatar-color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.color-option-ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 2px solid transparent;
}

.color-option-ball:hover {
  transform: scale(1.15);
}

.color-option-ball.selected {
  border-color: #FFFFFF;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   ELEMENTOS DE NAVEGAÇÃO MOBILE (BOTÃO VOLTAR & GAVETA CRM)
   ========================================================================== */
.mobile-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-back-btn:active {
  transform: scale(0.92);
  background: var(--bg-panel-hover);
}

.mobile-crm-toggle {
  display: none;
}

.crm-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
}

.crm-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* ==========================================================================
   RESPONSIVIDADE: TELAS MÉDIAS, LAPTOPS & TABLETS (<= 1240px)
   ========================================================================== */
@media (max-width: 1240px) {
  .crm-column {
    position: fixed;
    top: 62px;
    right: 0;
    bottom: 0;
    width: 340px;
    max-width: 88vw;
    background: var(--bg-sidebar);
    z-index: 120;
    box-shadow: var(--shadow-lg);
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--border-medium);
    display: flex !important;
    flex-direction: column;
  }

  .crm-column.crm-drawer-open {
    transform: translateX(0);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  }

  .crm-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: 62px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 110;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .crm-drawer-backdrop.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .header-center-stats {
    display: none;
  }
}

/* ==========================================================================
   RESPONSIVIDADE MOBILE SUPREMA: SMARTPHONES (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  body {
    height: 100vh;
    height: 100dvh; /* Altura dinâmica com barra do navegador */
    overflow: hidden;
  }

  /* Previne zoom automático indesejado no iOS Safari ao tocar em inputs */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Barra Superior Compacta */
  .top-header {
    height: 56px;
    padding: 0 12px;
  }

  .brand-logo-badge {
    width: 34px;
    height: 34px;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-title .platform-tag {
    display: none;
  }

  .brand-subtitle {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .whatsapp-status-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  #whatsappStatusText,
  #notificationBtnText {
    display: none !important;
  }

  .notification-bell-btn {
    padding: 6px 10px;
  }

  .operator-switch-box {
    padding: 4px 8px;
  }

  .operator-info {
    display: none;
  }

  .mobile-hide-text {
    display: none !important;
  }

  /* Navegação em Modo Aplicativo de Celular */
  .main-workspace {
    display: flex;
    position: relative;
    width: 100%;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    overflow: hidden;
  }

  /* ESTADO 1 (PADRÃO): LISTA DE CONVERSAS OCUPA 100% */
  .inbox-column {
    width: 100% !important;
    display: flex;
    flex: 1;
    height: 100%;
    border-right: none;
  }

  .chat-column {
    display: none !important;
    width: 100% !important;
    flex: 1;
    height: 100%;
  }

  /* ESTADO 2 (CHAT ABERTO): CHAT OCUPA 100% */
  body.mobile-chat-active .inbox-column {
    display: none !important;
  }

  body.mobile-chat-active .chat-column {
    display: flex !important;
  }

  body.mobile-chat-active .mobile-back-btn {
    display: flex;
  }

  body.mobile-chat-active .mobile-crm-toggle {
    display: flex;
  }

  /* Abas do Inbox Roláveis no Toque */
  .inbox-nav-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .inbox-tab-btn {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 12px;
    flex-shrink: 0;
  }

  /* Barra de Busca e Filtro no Mobile */
  .inbox-search-bar {
    padding: 8px 10px;
    gap: 8px;
    flex-direction: column;
  }

  .dept-filter-select {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Cartões de Conversa Otimizados para Toque e Fotos Perfeitas */
  .conversation-card {
    padding: 10px 12px !important;
    gap: 12px !important;
  }

  .card-avatar-wrap {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex-shrink: 0 !important;
  }

  .card-avatar-img {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .card-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
  }

  /* Cabeçalho do Chat Mobile Ultra Polido e Compacto */
  .chat-header {
    height: 56px !important;
    padding: 0 8px !important;
    gap: 6px !important;
    justify-content: space-between !important;
  }

  .chat-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .chat-contact-details {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .chat-contact-details .chat-contact-name {
    font-size: 13.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .chat-contact-details .chat-contact-phone {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .chat-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .chat-action-btn {
    height: 32px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    gap: 2px !important;
    border-radius: var(--radius-sm) !important;
  }

  .chat-action-btn svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* Oculta textos dos botões e ações secundárias no header mobile para não vazar a tela */
  .desktop-only-text {
    display: none !important;
  }

  /* Oculta busca na conversa no header mobile (acessível via CRM) */
  .chat-header-actions button[onclick="toggleChatSearch()"] {
    display: none !important;
  }

  /* Oculta editar cliente no header mobile (já presente na ficha CRM) */
  .chat-header-actions button[onclick="openEditContactModal()"] {
    display: none !important;
  }

  /* Esconde texto do botão finalizar no mobile mantendo o ícone */
  .chat-header-actions .btn-action.success {
    padding: 6px 8px !important;
    font-size: 11px !important;
  }

  /* Oculta a barra de navegação inferior mobile quando o chat estiver ativo */
  body.mobile-chat-active .mobile-bottom-nav {
    display: none !important;
  }

  /* Área de Mensagens */
  .chat-messages-container {
    padding: 14px 12px;
  }

  .message-bubble {
    max-width: 86%;
    font-size: 14px;
  }

  /* Barra de Envio e Digitação com Safe-Area para iPhone */
  .chat-composer {
    padding: 10px 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .composer-input-row {
    gap: 8px;
  }

  .composer-textarea {
    min-height: 42px;
    padding: 10px 14px;
  }

  .btn-send-message {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  /* Gaveta do CRM no Smartphone */
  .crm-column {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 90vw;
    max-width: 380px;
    z-index: 120;
    display: flex !important;
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .crm-column.crm-drawer-open {
    transform: translateX(0);
  }

  .crm-drawer-backdrop.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  /* Modais Otimizados para Celular */
  .modal-card, .modal-card-lg {
    width: 95vw;
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }

  .modal-footer > div {
    width: 100%;
    flex-direction: column;
  }

  .modal-footer .btn-action {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }

  /* Formulário de Criação em 1 Coluna no Mobile */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full-width {
    grid-column: span 1;
  }
}

/* Botão sutil de ícone (Edição de Contato) */
.btn-icon-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-subtle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #60A5FA;
  border-color: var(--border-subtle);
}

/* ==========================================================================
   TELA DE AUTENTICAÇÃO, LOGIN E PRIMEIRO ACESSO (MASTER LOCK)
   ========================================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 20%, #172554 0%, #080C14 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(12px);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(17, 26, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(37, 99, 235, 0.2);
  padding: 32px 28px;
  color: var(--text-main);
  animation: authCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.auth-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  margin-bottom: 12px;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #F8FAFC;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.auth-btn-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  margin-top: 8px;
}

.auth-btn-submit:hover {
  background: linear-gradient(135deg, #1D4ED8, #1E40AF);
  transform: translateY(-1px);
}

.auth-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 16px;
}

.auth-link {
  color: #60A5FA;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-link:hover {
  color: #93C5FD;
  text-decoration: underline;
}

/* ==========================================================================
   MÍDIAS NO CHAT (ÁUDIO, FOTO, VÍDEO)
   ========================================================================== */
.msg-media-wrap {
  margin: 6px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.msg-media-img {
  max-width: 280px;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: block;
  transition: transform 0.2s ease;
  border: 1px solid var(--border-subtle);
}

.msg-media-img:hover {
  transform: scale(1.02);
}

.msg-audio-player-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.12);
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  max-width: 320px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

[data-theme="light"] .msg-audio-player-wrap {
  background: rgba(0, 0, 0, 0.035);
  border-color: var(--border-subtle);
}

.msg-media-audio {
  flex: 1;
  min-width: 190px;
  height: 38px;
  outline: none;
  border-radius: 19px;
  margin: 0;
}

.audio-speed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 15px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.audio-speed-btn:hover {
  transform: scale(1.06);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.audio-speed-btn:active {
  transform: scale(0.94);
}

.audio-speed-btn.active {
  background: var(--primary);
  color: #090A0C;
  border-color: var(--primary);
  font-weight: 800;
  box-shadow: 0 0 12px var(--primary-glow);
}

[data-theme="light"] .audio-speed-btn.active {
  color: #FFFFFF;
}

.msg-media-video {
  max-width: 280px;
  border-radius: var(--radius-md);
}

.msg-media-doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  color: #60A5FA;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

.msg-media-doc:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #93C5FD;
}

/* Tag de ADM nos usuários */
.badge-admin-tag {
  display: inline-block;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 4px;
  margin-left: 6px;
}

/* Fotos de Perfil do WhatsApp (Contatos & Header) */
.card-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: block;
}

.header-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
  display: block;
}

.crm-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-medium);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: block;
}

/* ==========================================================================
   INDICADOR DE VERSÃO NO CANTO INFERIOR
   ========================================================================== */
.app-version-badge {
  position: fixed;
  bottom: 10px;
  right: 14px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #94A3B8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  user-select: none;
}

.app-version-badge .version-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}

/* ==========================================================================
   TICKS DE CONFIRMAÇÃO DE MENSAGEM (1 CHECK / 2 CHECKS / VERDE)
   ========================================================================== */
.msg-status-ticks {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 2px;
}

.msg-status-ticks.ticks-read svg {
  stroke: #10B981 !important;
  filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.45));
}

.msg-status-ticks.ticks-delivered svg {
  stroke: #94A3B8 !important;
}

.msg-status-ticks.ticks-pending svg {
  stroke: #64748B !important;
}

/* ==========================================================================
   CARD DE MÍDIA SOB DEMANDA (FOTOS / VÍDEOS / ÁUDIOS)
   ========================================================================== */
.media-download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  max-width: 320px;
}

.media-download-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.media-download-info .media-icon {
  font-size: 20px;
}

.media-download-info .media-name {
  font-size: 12px;
  font-weight: 600;
  color: #F1F5F9;
}

.media-download-info .media-hint {
  font-size: 10px;
  color: #94A3B8;
}

.btn-download-media {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-download-media:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
}

.btn-download-media:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   HEADER NAVIGATION (TITAN HUB vs CONVERSAS)
   ========================================================================== */
.header-center-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel);
  padding: 4px 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(8px);
}

.header-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.header-nav-btn:hover {
  color: var(--text-main);
  background: var(--bg-panel-hover);
}

.header-nav-btn.active {
  background: var(--bg-elevated);
  border-color: var(--border-focus);
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.nav-counter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 9px;
  background: #EF4444;
  color: #FFFFFF;
}

/* ==========================================================================
   CONVERSATION CARD: TELEFONE ABAIXO DO NOME & AVATAR ZOOM
   ========================================================================== */
.card-contact-phone {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono, monospace);
  margin-top: 1px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
}

.card-avatar-wrap {
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease;
}

.card-avatar-wrap:hover {
  transform: scale(1.06);
}

.card-avatar-wrap:active {
  transform: scale(0.96);
}

/* ==========================================================================
   TITAN HUB: DASHBOARD EXECUTIVO & OPERACIONAL (EW MARCENARIA)
   ========================================================================== */
.hub-container {
  flex: 1;
  height: calc(100vh - 64px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 36px 60px 36px;
  background: radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 15% 85%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
              var(--bg-main);
  scroll-behavior: smooth;
}

/* Hero Banner */
.hub-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--hub-hero-bg);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hub-hero-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hub-hero-content {
  flex: 1;
  max-width: 640px;
  z-index: 2;
}

.hub-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.hub-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.hub-hero-subtitle {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 18px 0;
}

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

.hub-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #2B6CB0 0%, #38BDF8 100%);
  color: #090A0C;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 100%);
}

.hub-cta-badge {
  background: rgba(9, 10, 12, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.hub-secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hub-secondary-btn:hover {
  background: #2D3748;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Card Gigante Hero da Fila */
.hub-hero-card {
  background: var(--hub-card-bg);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  text-align: center;
  min-width: 250px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.stat-number-giant {
  font-size: 46px;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.stat-label-giant {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-sub-giant {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.hub-card-btn {
  width: 100%;
  padding: 9px 14px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FBBF24;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hub-card-btn:hover {
  background: var(--amber);
  color: #090A0C;
  transform: translateY(-1px);
}

/* Grade de KPIs */
.hub-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-color: var(--border-medium);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-icon {
  font-size: 22px;
}

.kpi-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-family: var(--font-mono);
}

.kpi-tag.waiting { background: rgba(239, 68, 68, 0.12); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.kpi-tag.active { background: rgba(56, 189, 248, 0.12); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.3); }
.kpi-tag.my { background: rgba(168, 85, 247, 0.12); color: #C084FC; border: 1px solid rgba(168, 85, 247, 0.3); }
.kpi-tag.closed { background: rgba(16, 185, 129, 0.12); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }

.kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.kpi-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.kpi-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Grid de Seções do Hub */
.hub-sections-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
}

.hub-card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.panel-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 3px 0 0 0;
}

.panel-btn-action {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.panel-btn-action:hover {
  background: #2D3748;
  border-color: var(--border-focus);
  color: var(--primary);
}

/* Setores EW Marcenaria */
.dept-cards-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dept-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.18s ease;
}

.dept-item-card:hover {
  background: #252B35;
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(3px);
}

.dept-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dept-icon {
  font-size: 20px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
}

.dept-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.dept-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.dept-badge-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-family: var(--font-mono);
}

/* Coluna Lateral do Hub */
.hub-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hub-shield-box {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.shield-badge {
  font-size: 11px;
  font-weight: 800;
  color: #34D399;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.shield-status {
  font-size: 10px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.shield-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.shield-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.spec-item {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  padding: 8px;
  text-align: center;
}

.spec-label {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
}

.spec-val {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #34D399;
  margin-top: 2px;
  font-family: var(--font-mono);
}

.hub-operators-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hub-shortcut-btn {
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.hub-shortcut-btn:hover {
  background: #2A303C;
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* ==========================================================================
   LIGHTBOX MODAL (VISUALIZAÇÃO AMPLIADA DA FOTO DE PERFIL)
   ========================================================================== */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: none; /* Oculto por padrão absoluto */
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal-content {
  position: relative;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 16px;
  transition: all 0.18s ease;
}

.lightbox-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  transform: rotate(90deg);
}

.lightbox-img-wrapper {
  width: 100%;
  height: 360px;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.lightbox-fallback-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}

.lightbox-footer {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0B1120;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-info {
  display: flex;
  flex-direction: column;
}

.lightbox-name {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.lightbox-phone {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono, monospace);
  margin-top: 2px;
}

.btn-lightbox-action {
  padding: 8px 14px;
  border-radius: 8px;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-lightbox-action:hover {
  background: #1D4ED8;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR (LAYOUT PRIMOROSO)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 999;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  color: #64748B;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:active {
  transform: scale(0.92);
}

.mobile-nav-item.active {
  color: #38BDF8;
  font-weight: 700;
}

.mobile-nav-item.active svg {
  stroke: #38BDF8;
}

.mobile-nav-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-badge-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: #EF4444;
  border-radius: 50%;
  border: 1.5px solid #0B0F19;
  display: none;
}

/* ==========================================================================
   RESPONSIVIDADE MOBILE PRIMOROSA (@media <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Ativa barra de navegação inferior mobile */
  .mobile-bottom-nav {
    display: flex;
  }

  /* Esconde o switcher do topo no mobile para não poluir o header pequeno */
  .header-center-nav {
    display: none;
  }

  /* Ajusta badge de versão para ficar acima da barra mobile */
  .app-version-badge {
    bottom: 66px !important;
    right: 12px !important;
    font-size: 9.5px !important;
    padding: 3px 8px !important;
  }

  /* HUB Container no Mobile */
  .hub-container {
    height: calc(100vh - 56px - 60px);
    height: calc(100dvh - 56px - 60px);
    padding: 16px 14px 40px 14px;
  }

  .hub-hero-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 18px;
    gap: 18px;
    border-radius: 14px;
  }

  .hub-hero-title {
    font-size: 20px;
  }

  .hub-hero-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .hub-hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .hub-cta-btn,
  .hub-secondary-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }

  .hub-hero-card {
    width: 100%;
    min-width: 0;
    padding: 16px;
  }

  /* KPIs no Mobile: Grid 2x2 */
  .hub-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .kpi-card {
    padding: 14px 12px;
  }

  .kpi-value {
    font-size: 24px;
  }

  .kpi-title {
    font-size: 12px;
  }

  .kpi-desc {
    display: none; /* Oculta descrição longa no celular para manter o layout limpo */
  }

  /* Seções do Hub no Mobile: 1 Coluna */
  .hub-sections-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hub-card-panel {
    padding: 16px;
  }

  .shield-specs-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* Lightbox no Mobile */
  .lightbox-modal-content {
    max-width: 92vw;
  }

  .lightbox-img-wrapper {
    height: 300px;
  }

  /* Workspace de Conversas com padding para a barra inferior */
  body:not(.mobile-chat-active) .inbox-column {
    padding-bottom: 60px;
  }
}

/* ==========================================================================
   UPLOAD E ENVIO DE MÍDIAS / ARQUIVOS / IMAGENS NO CHAT
   ========================================================================== */
.composer-attach-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.composer-attach-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60A5FA;
  transform: translateY(-1px);
}

.composer-attach-btn:active {
  transform: scale(0.95);
}

/* Botão de Microfone / Gravar Áudio */
.composer-mic-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.composer-mic-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34D399;
  transform: translateY(-1px);
}

.composer-mic-btn:active {
  transform: scale(0.95);
}

/* Barra de Gravação de Áudio Ativa */
.composer-recording-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.12);
  animation: slideUp 0.2s ease-out;
}

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

.recording-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 12px #EF4444;
  animation: recordPulse 1s infinite alternate ease-in-out;
}

@keyframes recordPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.25); opacity: 1; }
}

.recording-title {
  font-size: 13px;
  font-weight: 600;
  color: #F87171;
}

.recording-timer {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
  color: var(--text-main, #F8FAFC);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.recording-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-cancel-recording {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-recording:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #EF4444;
  color: #FFFFFF;
}

.btn-send-recording {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #10B981;
  border: 1px solid #059669;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-send-recording:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.btn-send-recording:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Painel de Preview de Anexo */
.media-preview-box {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  animation: slideUp 0.18s ease-out;
}

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

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

.media-preview-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.preview-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.preview-file-name {
  font-size: 13px;
  font-weight: 600;
  color: #F8FAFC;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.preview-file-size {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.preview-btn-close {
  background: transparent;
  border: none;
  color: #64748B;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.preview-btn-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.preview-img-container {
  max-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-img {
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
}

.preview-caption-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-caption-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 12px;
  color: #FFFFFF;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.preview-caption-input:focus {
  border-color: #3B82F6;
}

.preview-btn-send {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.preview-btn-send:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
}

.preview-btn-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   POLIMENTO DE FLUIDEZ, SCROLL ULTRA-SUAVE & RESPONSIVIDADE DE CABEÇALHO
   ========================================================================== */

/* Rolagem com aceleração de hardware e física de inércia suave */
html, body {
  scroll-behavior: smooth;
}

.chat-messages-container,
.conversations-scroll-list,
.hub-container {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Micro-animação refinada para novos balões de mensagem */
.message-row {
  animation: fadeInMsg 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

/* Efeito de pulso luminoso ao clicar em uma citação para encontrar a mensagem */
@keyframes highlightMessagePulse {
  0% {
    background-color: rgba(59, 130, 246, 0.38);
    transform: scale(1.015);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
  }
  50% {
    background-color: rgba(59, 130, 246, 0.2);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
    box-shadow: none;
  }
}

.highlight-pulse {
  animation: highlightMessagePulse 1.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-radius: var(--radius-lg);
}

/* Estado de busca com realce visual */
.message-row.search-matched .bubble {
  border: 1.5px solid #F59E0B !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35) !important;
  animation: searchGlow 1.5s infinite alternate ease-in-out;
}

@keyframes searchGlow {
  0% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.25); }
  100% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.55); }
}

/* Botão de cópia com estado de confirmação tátil */
.msg-action-btn.copied {
  color: #10B981 !important;
  border-color: #10B981 !important;
  background: rgba(16, 185, 129, 0.15) !important;
}

/* Ajustes responsivos para telas intermediárias (Laptops 1366x768, 1280x800 e Tablets) */
@media (max-width: 1300px) {
  .header-center-stats {
    display: none !important;
  }
}

@media (max-width: 1120px) {
  #whatsappStatusText {
    display: none !important;
  }
  #notificationBtnText {
    display: none !important;
  }
  #btnOpenUserModal span {
    display: none !important;
  }
  #btnOpenUserModal {
    padding: 0 10px !important;
  }
  .operator-info {
    display: none !important;
  }
}

/* ==========================================================================
   BOTÃO E MODAL DE NOVA CONVERSA (INICIAR CHAT / BUSCA DE CONTATOS)
   ========================================================================== */

/* Barra do Botão Nova Conversa na Coluna de Conversas */
.inbox-new-chat-bar {
  padding: 10px 14px 6px 14px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
}

.btn-new-chat {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(43, 108, 176, 0.22) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-lg);
  color: #38BDF8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.btn-new-chat:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28) 0%, rgba(43, 108, 176, 0.38) 100%);
  border-color: #38BDF8;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.btn-new-chat:active {
  transform: scale(0.98);
}

.btn-sync-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  color: #10B981;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-sync-all:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: #10B981;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.btn-sync-all:active {
  transform: scale(0.98);
}

.btn-sync-all.loading svg {
  animation: sync-spin 1s linear infinite;
}

@keyframes sync-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.is-group-card {
  border-left: 3px solid #8b5cf6 !important;
}

.group-avatar {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #fff !important;
}

/* Modal de Nova Conversa */
.new-chat-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-input);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin-bottom: 16px;
}

.new-chat-tab-btn {
  flex: 1;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.new-chat-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.new-chat-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(56, 189, 248, 0.06);
}

/* Seção de Contatos */
.new-chat-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.new-chat-search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.new-chat-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
  outline: none;
}

.new-chat-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.new-chat-contacts-scroll {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.contact-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.contact-item-card:last-child {
  border-bottom: none;
}

.contact-item-card:hover {
  background: var(--bg-panel-hover);
}

.contact-item-card:active {
  background: rgba(56, 189, 248, 0.08);
}

.contact-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.contact-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #FFFFFF;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.contact-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-item-details {
  min-width: 0;
  flex: 1;
}

.contact-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-item-phone {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 1px;
}

.contact-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.contact-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.btn-contact-action {
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.contact-item-card:hover .btn-contact-action {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.new-chat-empty-contacts {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ==========================================================================
   BOTÃO CARREGAR MENSAGENS ANTERIORES & INÍCIO DE HISTÓRICO
   ========================================================================== */
.load-older-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 0 10px 0;
  margin-bottom: 6px;
  animation: fadeIn 0.25s ease-out;
}

.btn-load-older {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 18px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 24px;
  color: #38BDF8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-load-older svg {
  transition: transform 0.2s ease;
}

.btn-load-older:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.9);
  border-color: #38BDF8;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.25);
  transform: translateY(-1.5px);
}

.btn-load-older:hover:not(:disabled) svg {
  transform: translateY(-2px);
}

.btn-load-older:active:not(:disabled) {
  transform: translateY(0);
}

.btn-load-older:disabled {
  opacity: 0.75;
  cursor: wait;
}

.chat-beginning-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  user-select: none;
}

[data-theme="light"] .btn-load-older {
  background: rgba(240, 249, 255, 0.92);
  border-color: rgba(2, 132, 199, 0.35);
  color: #0284C7;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.12);
}

[data-theme="light"] .btn-load-older:hover:not(:disabled) {
  background: #0284C7;
  border-color: #0284C7;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

[data-theme="light"] .chat-beginning-pill {
  background: rgba(0, 0, 0, 0.03);
  color: #64748B;
}





