:root {
  --primary: #1A3C5E; /* Azul Escuro Institucional IBGPP */
  --primary-hover: #122a42;
  --primary-light: #eff6ff;
  --primary-subtle: #e9f0f6;
  --blue-mid: #2D6A9F;
  --blue-light: #2D9CDB;
  --accent: #E85D10; /* Laranja Oficial IBGPP */
  --accent-hover: #c24a08;
  --accent-light: #ff7a35;
  --accent-pale: #FFF0E8;
  --wpp-green: #25D366;
  --wpp-green-dark: #128C7E;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  height: 60px;
  min-height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
}

.logo-text h1 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.logo-text span {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #bfdbfe;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.wpp-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-dot.qr_ready {
  background: var(--warning);
  animation: pulse 1.5s infinite;
}

.status-dot.connecting {
  background: #3b82f6;
  animation: pulse 1.5s infinite;
}

.status-dot.disconnected {
  background: var(--danger);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Container Principal */
.main-content {
  flex: 1;
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Telas Auxiliares (Fora do Chat) */
.page-container {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.contact-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 12px;
  margin: 2px 4px 2px 0;
  line-height: 1.3;
}

/* Layout 3 Colunas Atendimento */
.chat-layout {
  flex: 1;
  display: flex;
  height: 100%;
  width: 100%;
  background: #f1f5f9;
}

/* Coluna 1: Lista de Conversas */
.chat-sidebar {
  width: 390px;
  min-width: 360px;
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-search-box {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #f8fafc;
}

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

.search-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Apple-style Segmented Control */
.filter-tabs-container {
  padding: 8px 10px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.filter-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
  overflow: hidden;
}

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

.tab-pill {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 3px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  border-radius: 7px;
  border-bottom: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.tab-pill i {
  font-size: 9.5px;
  flex-shrink: 0;
}

.tab-pill span:not(.badge-count) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-pill.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.badge-count {
  background: #e2e8f0;
  color: #475569;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  flex-shrink: 0;
}

.tab-pill.active .badge-count {
  background: #0284c7;
  color: #ffffff;
}

.tab-pill.queue-tab.has-pending .badge-count {
  background: #ea580c;
  color: #ffffff;
  animation: pulse 1s infinite;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-card {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  display: flex;
  gap: 12px;
  transition: background 0.15s;
}

.chat-card:hover {
  background: #f8fafc;
}

.chat-card.active {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

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

.chat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

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

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

.chat-card-mid {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.protocol-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.dept-tag {
  background: #fef3c7;
  color: #b45309;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.chat-snippet {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Coluna 2: Chat Ativo (Estilo Apple / Modern) */
.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
}

.chat-header {
  height: 64px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.chat-actions {
  display: flex;
  gap: 8px;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Balões de Mensagens estilo Apple / Modern */
.msg-bubble {
  max-width: 68%;
  padding: 10px 14px;
  border-radius: 18px;
  position: relative;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease;
}

.msg-bubble.client {
  align-self: flex-start;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom-left-radius: 4px;
}

.msg-bubble.agent,
.msg-bubble.user,
.msg-bubble.cellphone {
  align-self: flex-end;
  background: #dcfce7;
  color: #064e3b;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-bottom-right-radius: 4px;
}

.msg-bubble.bot {
  align-self: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  color: #334155;
  max-width: 82%;
  font-size: 13px;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0284c7;
}

.msg-bubble.internal_note {
  align-self: center;
  background: #fefce8;
  border: 1px dashed #eab308;
  color: #713f12;
  max-width: 85%;
  font-size: 13px;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.msg-sender {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
  color: #0369a1;
}

.msg-bubble.agent .msg-sender,
.msg-bubble.user .msg-sender,
.msg-bubble.cellphone .msg-sender {
  color: #047857;
}

.msg-bubble.bot .msg-sender {
  color: #0284c7;
}

.msg-time {
  font-size: 10.5px;
  color: #64748b;
  text-align: right;
  margin-top: 4px;
}

.msg-bubble.agent .msg-time,
.msg-bubble.user .msg-time,
.msg-bubble.cellphone .msg-time {
  color: #059669;
}

.chat-footer {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-footer textarea {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 13.5px;
  resize: none;
  height: 42px;
  outline: none;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.chat-footer textarea:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

/* Barra de Gravação de Áudio Autêntica do WhatsApp */
.audio-record-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  min-height: 54px;
  gap: 16px;
  animation: slideUpRecord 0.2s ease-out;
}

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

.btn-audio-discard {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.btn-audio-discard:hover {
  background: #fee2e2;
  transform: scale(1.05);
}

.audio-record-live {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.audio-recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-recording 1.2s infinite;
}

@keyframes pulse-recording {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.audio-record-timer {
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  min-width: 46px;
}

.audio-wave-visualizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.audio-wave-visualizer span {
  display: block;
  width: 3px;
  height: 6px;
  background: #0284c7;
  border-radius: 2px;
  animation: waveAnim 1s ease-in-out infinite alternate;
}

.audio-wave-visualizer span:nth-child(2) { animation-delay: 0.15s; height: 12px; }
.audio-wave-visualizer span:nth-child(3) { animation-delay: 0.3s; height: 18px; }
.audio-wave-visualizer span:nth-child(4) { animation-delay: 0.45s; height: 8px; }
.audio-wave-visualizer span:nth-child(5) { animation-delay: 0.2s; height: 14px; }
.audio-wave-visualizer span:nth-child(6) { animation-delay: 0.35s; height: 10px; }

@keyframes waveAnim {
  0% { height: 4px; }
  100% { height: 18px; }
}

.audio-record-bar.paused .audio-wave-visualizer span {
  animation-play-state: paused;
  background: #94a3b8;
}

.audio-record-bar.paused .audio-recording-dot {
  animation: none;
  background: #94a3b8;
}

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

.btn-audio-pause {
  background: #f1f5f9;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-audio-pause:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-audio-send {
  background: #10b981;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
  transition: all 0.2s;
}

.btn-audio-send:hover {
  background: #059669;
  transform: scale(1.05);
}

.btn-send {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.btn-send:hover {
  background: var(--primary-hover);
}

/* Tags de Contato */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #bae6fd;
}

.tag-badge .btn-tag-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #0369a1;
  font-size: 10px;
  padding: 0;
  margin-left: 2px;
  line-height: 1;
}

.tag-badge .btn-tag-remove:hover {
  color: #b91c1c;
}

.contact-card-tag {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-right: 3px;
  margin-top: 2px;
}

/* Coluna 3: Ficha Lateral */
.chat-info-sidebar {
  width: 300px;
  background: #ffffff;
  border-left: 1px solid var(--border);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.info-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

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

.info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

/* Botões Genéricos */
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); }

.btn-success { background: var(--success); color: white; }
.btn-outline { background: white; border-color: var(--border); color: var(--text-dark); }
.btn-outline:hover { background: #f8fafc; }
.btn-danger { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.btn-danger:hover { background: #fecaca; }

/* Modais */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* Formulários */
.form-group {
  margin-bottom: 16px;
}

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

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
}

/* Tabelas */
.table-wrap {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

th {
  background: #f8fafc;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
}

tr:last-child td {
  border-bottom: none;
}

/* Tela de Login Institucional IBGPP */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, #1A3C5E 0%, #0d2137 60%, #081422 100%);
  position: relative;
  overflow: hidden;
  padding: 24px 16px;
}

.login-wrap::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 93, 16, 0.18) 0%, rgba(232, 93, 16, 0) 70%);
  pointer-events: none;
}

.login-wrap::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 156, 219, 0.15) 0%, rgba(45, 156, 219, 0) 70%);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 38px 32px 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  border-top: 5px solid var(--accent);
}

/* QR Code Display */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 440px;
  margin: 0 auto;
}

.qr-box {
  width: 260px;
  height: 260px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Avatar com Foto Real */
.avatar-circle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Ações de Mídia no Rodapé do Chat */
.chat-footer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tool {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.btn-tool:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.btn-record.recording {
  background: #fee2e2;
  color: #ef4444;
  animation: pulse-red 1.2s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Barra de Pré-visualização de Anexo */
.attachment-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-dark);
}

.attachment-preview .file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview .btn-remove-attachment {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

/* Estilos de Pesquisa de Satisfação */
.survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.survey-stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.survey-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stars-gold {
  color: #f59e0b;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
}

.rating-5 { background: #dcfce7; color: #15803d; }
.rating-4 { background: #e0f2fe; color: #0369a1; }
.rating-3 { background: #fef9c3; color: #a16207; }
.rating-2 { background: #ffedd5; color: #c2410c; }
.rating-1 { background: #fee2e2; color: #b91c1c; }

/* Container e Toast de Notificação */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  pointer-events: none;
}

.toast-notification {
  pointer-events: auto;
  background: #ffffff;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  animation: toast-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
}

.toast-notification:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -5px rgba(0, 0, 0, 0.2);
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-time {
  font-size: 10px;
  color: #94a3b8;
  font-weight: normal;
}

.toast-text {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  padding: 2px;
  line-height: 1;
}
.toast-close:hover {
  color: #0f172a;
}

@keyframes toast-slide-in {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-fade-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(120%);
  }
}


