/*
   CSS Dark Theme — paleta estilo claude.ai
   Tokens:
     --bg-root:    #0d0d0d  (fundo raiz)
     --bg-primary: #141414  (superfícies principais)
     --bg-surface: #1e1e1e  (cards, inputs, dropdowns)
     --bg-hover:   #252525  (hover states)
     --border:     #2a2a2a  (bordas e divisores)
     --border-md:  #333333  (bordas com mais ênfase)
     --text-1:     #f0f0f0  (texto primário)
     --text-2:     #a0a0a0  (texto secundário)
     --text-3:     #606060  (texto muted/hints)
     --accent:     #075e54  (verde principal)
     --accent-lt:  #0a7566  (hover do accent)
*/
:root {
  --bg: #0b0f14;
  --bg-root: #0d0d0d;
  --bg-primary: #141414;
  --bg-surface: #1e1e1e;
  --bg-hover: #252525;
  --surface: #111820;
  --surface2: #162030;
  --border: #2a2a2a;
  --border-bright: #2a4060;
  --border-md: #333333;
  --text-1: #f0f0f0;
  --text-2: #a0a0a0;
  --text-3: #606060;
  /* --accent: #075e54; */
  --accent-lt: #0a7566;
  --accent: #00d4ff;
  --accent2: #ff6b35;
  --accent3: #7fff6b;
  --text: #d0e8ff;
  --text-muted: #5a7a9a;
  --text-dim: #3a5070;
  --danger: #ff4466;
  --danger-dim: #2a0f18;
  --success: #00cc88;
  --radius: 8px;
  --mono: "DM Mono", monospace;
  --sans: "Sora", sans-serif;
}

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

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-family: var(--sans);
  background: var(--bg-root);
  color: var(--text);
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.app-container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #141414;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ── Header ── */
.app-header {
  display: flex;
  justify-content: flex-end;
  background: #0d0d0d;
  border-bottom: 1px solid #2a2a2a;
  position: relative;
  flex-shrink: 0;
}

.connection-status {
  display: flex;
  gap: 25px;
  margin: auto;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  transition: background 0.2s;
}

.user-profile:hover {
  background: #1e1e1e;
}

.user-name {
  font-size: 12px;
  color: #a0a0a0;
  font-weight: 500;
  line-height: 1.4;
}

.dropdown-arrow {
  font-size: 10px;
  color: #606060;
}

.dropdown-arrow:hover {
  color: #a0a0a0;
}

.user-dropdown {
  position: absolute;
  top: 29px;
  right: 12px;
  background: #1e1e1e;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  border: 1px solid #2a2a2a;
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
}

.user-info-dropdown {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #252525;
}

.user-info-dropdown strong {
  color: #f0f0f0;
  font-size: 14px;
}

.user-info-dropdown small {
  color: #a0a0a0;
  font-size: 12px;
}

.dropdown-divider {
  height: 1px;
  background: #2a2a2a;
}

.profile-dropdown-btn {
  width: 100%;
  padding: 12px 15px;
  background: #1e1e1e;
  border: none;
  text-align: left;
  cursor: pointer;
  color: #e0e0e0;
  font-size: 14px;
  transition: background 0.2s;
}

.profile-dropdown-btn:hover {
  background: #2a2a2a;
}

.logout-dropdown-btn {
  width: 100%;
  padding: 12px 15px;
  background: #1e1e1e;
  border: none;
  text-align: left;
  cursor: pointer;
  color: #e05555;
  font-size: 14px;
  transition: background 0.2s;
}

.logout-dropdown-btn:hover {
  background: #2a1a1a;
}

/* ── Top Menu ── */
.top-menu {
  background: #0d0d0d;
  display: flex;
  gap: 0;
  border-bottom: 1px solid #2a2a2a;
  position: relative;
  padding-left: 0;
  flex-shrink: 0;
}

.menu-item {
  flex: 1;
  padding: 8px 20px;
  text-align: center;
  cursor: pointer;
  color: #606060;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.menu-item.active,
.menu-item:hover {
  color: #f0f0f0;
  border-bottom-color: #075e54;
  background: rgba(255, 255, 255, 0.03);
}

/* ── Layout ── */
.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.tab-chats {
  width: 100%;
  display: flex;
  overflow: hidden;
}

.tab-chats.hidden,
.tab-flow.hidden,
.dash-wrap.hidden,
.tab-configuracoes.hidden {
  display: none;
}

/* ── QR Code Modal ── */
.qrcode-modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}

.qrcode-modal.active {
  display: flex;
}

.qrcode-content {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  width: 90%;
  max-width: 450px;
  text-align: center;
  animation: modalSlideIn 0.3s ease;
  overflow: hidden;
}

.qrcode-header {
  background: #075e54;
  color: white;
  padding: 20px;
}

.qrcode-header h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
}

.qrcode-header p {
  font-size: 12px;
  opacity: 0.9;
}

.qrcode-body {
  padding: 30px;
}

.qrcode-container {
  background: #141414;
  border: 1px solid #2a2a2a;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  min-height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#qrcodeImage {
  display: flex;
  justify-content: center;
  align-items: center;
}

#qrcodeImage img,
#qrcodeImage canvas,
#qrcodeImage #qrcode {
  width: 280px !important;
  height: 280px !important;
  max-width: 280px;
  max-height: 280px;
}

.pairing-container {
  background: #141414;
  border: 1px solid #2a2a2a;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.pairing-code {
  font-size: 28px;
  font-weight: bold;
  color: #1db993;
  letter-spacing: 2px;
  background: #0d0d0d;
  padding: 15px;
  border-radius: 8px;
  font-family: monospace;
  margin-top: 10px;
  word-break: break-all;
}

.qrcode-status {
  font-size: 13px;
  color: #a0a0a0;
  margin-top: 15px;
}

.qrcode-status.connecting {
  color: #e09020;
}

.qrcode-status.connected {
  color: #4caf50;
}

.qrcode-status.error {
  color: #e05555;
}

.qrcode-close {
  display: flex;
  justify-content: center;
  gap: 5px;
  background: #141414;
  border-top: 1px solid #2a2a2a;
  padding: 15px;
}

.qrcode-close button {
  background: #075e54;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.qrcode-close button:hover {
  background: #0a7566;
}

.qrcode-loader {
  width: 50px;
  height: 50px;
  border: 3px solid #2a2a2a;
  border-top: 3px solid #075e54;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.qrcode-loader.none {
  display: none;
}

/* ── Alerta ── */
.alerta {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  color: white;
  border-radius: 8px;
  z-index: 9999;
  animation: slideIn 0.3s ease;
  background: #2a6e3f;
}

.alerta-success {
  background: #2a6e3f;
}

.alerta-error {
  background: #7a2020;
}

/* ── Sidebar ── */
.sidebar {
  width: 320px;
  background: #141414;
  border-right: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.sidebar-header {
  background: #0d0d0d;
  color: #f0f0f0;
  padding: 10px 16px;
  max-height: 60px;
  flex-shrink: 0;
  border-bottom: 1px solid #2a2a2a;
}

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
}

.sidebar-header p {
  font-size: 12px;
  color: #606060;
}

.search-box {
  padding: 12px;
  background: #141414;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  background: #1e1e1e;
  color: #f0f0f0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input::placeholder {
  color: #606060;
}

.search-box input:focus {
  border-color: #075e54;
}

/* ── Filter Switch ── */
.filter-switch {
  padding: 12px 16px;
  background: #141414;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #a0a0a0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #f0f0f0;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #075e54;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.switch-footer {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 15px;
}

.switch-footer input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-footer {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: 0.3s;
  border-radius: 24px;
}

.slider-footer:before {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 1px;
  bottom: 3px;
  background-color: #f0f0f0;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider-footer {
  background-color: #075e54;
}

input:checked + .slider-footer:before {
  transform: translateX(26px);
}

/* ── Buttons flutuantes ── */
.broadcast-btn {
  position: fixed;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  font-size: 14px;
  border-radius: 50%;
  background: #1e1e1e;
  border: none;
  cursor: pointer;
  z-index: 1500;
}

/* ── File Preview ── */
.file-preview {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 350px;
  min-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  animation: slideIn 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.file-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #252525;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.preview-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.file-icon {
  font-size: 30px;
  width: 50px;
  text-align: center;
}

.file-info {
  flex: 1;
}

.file-name {
  font-size: 12px;
  font-weight: 500;
  color: #f0f0f0;
}

.file-size {
  font-size: 10px;
  color: #606060;
}

.file-caption {
  width: 100%;
  margin-top: 5px;
  padding: 4px 8px;
  border: 1px solid #333;
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  background: #141414;
  color: #f0f0f0;
}

.file-caption:focus {
  outline: none;
  border-color: #075e54;
}

.file-preview-remove {
  background: #7a2020;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.file-preview-send {
  background: #075e54;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  font-weight: 500;
  transition: background 0.2s;
}

.file-preview-send:hover {
  background: #0a7566;
}

/* ── Tickets List ── */
.tickets-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  overflow-x: hidden;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e1e1e;
  margin-bottom: 6px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.12s ease;
  border-bottom: 1px solid #6b6a6a;
  position: relative;
}

.ticket-item:hover {
  background: #252525;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ticket-item.active {
  background: rgba(67, 159, 46, 0.15);

  /* background: #0d1f1c; */
  border-left: 4px solid #075e54;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-left: 5px;
}

.ticket-item.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.ticket-info {
  flex: 1;
  min-width: 0;
}

.ticket-name {
  font-weight: 600;
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-preview {
  font-size: 13px;
  color: #606060;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  line-height: 1.4;
}

.ticket-time {
  font-size: 11px;
  color: #606060;
  font-weight: normal;
}

.ticket-badge {
  background: #075e54;
  color: white;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
  letter-spacing: 0.3px;
}

.status-badge.pending {
  background: #2a1e08;
  color: #e09020;
  border: 1px solid #3a2a0a;
}

.status-badge.pending::before {
  content: "\1F4CB  ";
}

.status-badge.atendendo {
  background: #0a1a2e;
  color: #4a9edd;
  border: 1px solid #0f2540;
}

.status-badge.open {
  background: #0a1a2e;
  color: #4a9edd;
  border: 1px solid #0f2540;
}

.status-badge.open::before {
  content: "\1F3A7  ";
}

.status-badge.closed {
  background: #0a2010;
  color: #4caf50;
  border: 1px solid #0f3018;
}

.status-badge.closed::before {
  content: "\2713   ";
}

.ticket-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #075e54, #0a7566);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ticket-actions {
  display: flex;
  gap: 6px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 30, 30, 0.97);
  padding: 6px 8px;
  border-radius: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  border: 1px solid #2a2a2a;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.ticket-item:hover .ticket-actions {
  opacity: 1;
}

.action-btn {
  background: #252525;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 20px;
  transition: all 0.2s;
}

.action-btn:hover {
  transform: scale(1.05);
}

.action-btn.attend {
  background: #0a1a2e;
  color: #4a9edd;
}

.action-btn.attend:hover {
  background: #2196f3;
  color: white;
}

.action-btn.close {
  background: #0a2010;
  color: #4caf50;
}

.action-btn.close:hover {
  background: #4caf50;
  color: white;
}

.action-btn.reopen {
  background: #2a1e08;
  color: #e09020;
}

.action-btn.reopen:hover {
  background: #ff9800;
  color: white;
}

.loading-state,
.empty-state {
  text-align: center;
  padding: 40px;
  color: #606060;
}

#broadcastFileName {
  font-size: 14px;
  line-height: 1.4;
  color: #f0f0f0;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  border: 3px solid #2a2a2a;
  border-top: 3px solid #075e54;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ── Scrollbar ── */
.dash-wrap::-webkit-scrollbar,
.sidebar-flow::-webkit-scrollbar,
.messages-area::-webkit-scrollbar,
.tickets-list::-webkit-scrollbar,
.tab-conexoes::-webkit-scrollbar,
.file-preview::-webkit-scrollbar {
  width: 6px;
}
.dash-wrap::-webkit-scrollbar,
.sidebar-flow::-webkit-scrollbar,
.messages-area::-webkit-scrollbar-track,
.tickets-list::-webkit-scrollbar-track,
.tab-conexoes::-webkit-scrollbar-track,
.file-preview::-webkit-scrollbar-track {
  background: #141414;
}

.dash-wrap::-webkit-scrollbar,
.sidebar-flow::-webkit-scrollbar,
.messages-area::-webkit-scrollbar-thumb,
.tickets-list::-webkit-scrollbar-thumb,
.tab-conexoes::-webkit-scrollbar-thumb,
.file-preview::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

/* ── Chat Container ── */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0d0d0d;
  overflow: hidden;
  height: 100%;
}

.chat-header {
  background: #141414;
  color: #f0f0f0;
  padding: 0px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  flex-shrink: 0;
  border-bottom: 1px solid #2a2a2a;
}

.chat-header input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  background: #1e1e1e;
  color: #f0f0f0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #0d0d0d;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.03"><path d="M0,0 L1000,0 L1000,1000 L0,1000 Z" fill="none"/><circle cx="100" cy="100" r="50" fill="%23fff"/><circle cx="300" cy="200" r="30" fill="%23fff"/><circle cx="500" cy="150" r="40" fill="%23fff"/><circle cx="700" cy="250" r="35" fill="%23fff"/><circle cx="850" cy="100" r="25" fill="%23fff"/><circle cx="150" cy="400" r="45" fill="%23fff"/><circle cx="400" cy="500" r="55" fill="%23fff"/><circle cx="650" cy="450" r="50" fill="%23fff"/><circle cx="900" cy="600" r="40" fill="%23fff"/><circle cx="200" cy="700" r="60" fill="%23fff"/><circle cx="500" cy="800" r="70" fill="%23fff"/><circle cx="800" cy="750" r="55" fill="%23fff"/></svg>');
  background-repeat: repeat;
  background-size: 50px;
}

.message-wrapper {
  display: flex;
  margin-bottom: 12px;
  animation: fadeInUp 0.3s ease-out;
}

.message-wrapper.sent {
  justify-content: flex-end;
}

.message-wrapper.received {
  justify-content: flex-start;
}

.message-wrapper.new-message {
  animation: highlight 1s ease-out;
}

.message-bubble {
  font-size: 14px;
  line-height: 1.4;
  max-width: 45%;
  position: relative;
  border-radius: 8px;
  padding: 8px 12px;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.msg {
  word-break: break-all;
  width: 100%;
}
.message-wrapper.sent .message-bubble {
  background: #1a3a20;
  color: #d4edda;
  border-top-right-radius: 0;
}

.message-wrapper.received .message-bubble {
  background: #1e1e1e;
  color: #f0f0f0;
  border-top-left-radius: 0;
  border: 1px solid #2a2a2a;
}

.sender {
  font-weight: 600;
  font-size: 11px;
  color: #606060;
}

.message-body {
  font-size: 14px;
  line-height: 1.4;
}

.message-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  color: #606060;
}
.container-quoted {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  min-height: 48px;
  max-height: 150px;
  margin-top: 8px;
  margin-bottom: 4px;
  overflow: hidden; /* Adiciona isso para evitar overflow */
}
.box-quoted {
  min-width: 100px;
  max-width: 350px;
  flex: 1;
}
.quoted {
  border-radius: 10px;
  min-height: 48px;
  padding: 8px; /* Aumenta o padding */
  position: relative;
  width: 100%; /* Garante que ocupe toda a largura */
  background: #71b9ac61;
  overflow: hidden; /* Evita que o conteúdo extravase */
}
.quoted-msg {
  font-size: 11px;
  word-break: break-word;
  width: 100%;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis; /* Adiciona reticências para texto longo */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limita a 3 linhas */
  -webkit-box-orient: vertical;
}
/* ── Chat Footer ── */
.chat-footer {
  background: #141414;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.message-input {
  flex: 1;
  border: 1px solid #2a2a2a;
  padding: 7px 15px;
  border-radius: 24px;
  background: #1e1e1e;
  color: #f0f0f0;
  resize: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.message-input::placeholder {
  color: #606060;
}

.message-input:focus {
  outline: none;
  border-color: #075e54;
}

.send-btn,
.attach-btn {
  background: #075e54;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.2s;
}

.send-btn:hover,
.attach-btn:hover {
  background: #0a7566;
}

.send-btn:disabled,
.attach-btn:disabled,
.message-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Form Groups ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #a0a0a0;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #141414;
  color: #f0f0f0;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #075e54;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}
/* ── Broadcast Modal ── */
.broadcast-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2500;
  justify-content: center;
  align-items: center;
}

.broadcast-modal.active {
  display: flex;
}

.broadcast-modal .modal-content {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  width: 90%;
  max-width: 550px;
  max-height: 95vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.broadcast-modal .modal-header {
  background: #075e54;
  color: white;
  padding: 20px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.broadcast-modal .modal-body {
  padding: 20px;
}

.broadcast-modal .form-group {
  margin-bottom: 20px;
}

.broadcast-modal label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #a0a0a0;
}

.broadcast-modal select,
.broadcast-modal input,
.broadcast-modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #141414;
  color: #f0f0f0;
}

.broadcast-modal textarea {
  resize: vertical;
  min-height: 100px;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-buttons button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background: #075e54;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-secondary {
  background: #252525;
  border: 1px solid #2a2a2a;
  color: #a0a0a0;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-primary:hover {
  background: #0a7566;
}

.btn-primary:disabled {
  background: #333;
  color: #606060;
  cursor: not-allowed;
}

.btn-secondary:hover {
  background: #2a2a2a;
}

/* ── Broadcast extras ── */
.broadcast-attach {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.insert {
  background: #075e54;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}

.broadcast-file-preview {
  background: #141414;
  border: 1px solid #2a2a2a;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #a0a0a0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.broadcast-send-btn {
  background: #075e54;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
}

.broadcast-send-btn:disabled {
  background: #252525;
  color: #606060;
  cursor: not-allowed;
}

/* ── Tab Teste / Configurações ── */
.tab-graficos,
.tab-configuracoes {
  width: 100%;
  overflow: hidden;
  background: #0d0d0d;
}

.tab-graficos {
  padding: 0 24px 24px;
  background: #0d0d0d;
}

.tab-graficos.hidden,
.tab-configuracoes.hidden {
  display: none;
}

/* ── Channels Grid ── */
.channel {
  text-transform: capitalize;
}

.connected {
  color: #027e0c;
}

.disconnected {
  color: red;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.channel-card {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.channel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.channel-icon {
  font-size: 32px;
}

.channel-name {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  color: #f0f0f0;
  margin-bottom: 8px;
}

.channel-detail {
  font-size: 13px;
  color: #606060;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.channel-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.channel-btn.connect {
  background: #075e54;
  color: white;
}

.channel-btn.connect:hover {
  background: #0a7566;
}

.channel-btn.disconnect {
  background: #7a2020;
  color: white;
}

.channel-btn.disconnect:hover {
  background: #9a2828;
}

.channel-btn.refresh {
  background: #1565a0;
  color: white;
}

.channel-btn.refresh:hover {
  background: #1976d2;
}

/* ── Configurações ── */
.config-container {
  display: flex;
  height: 100%;
  overflow: hidden;
  background: var(--bg-root);
}

.config-sidebar {
  width: 180px;
  min-width: 180px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  overflow-y: auto;
  flex-shrink: 0;
}

.config-sidebar-item {
  padding: 12px 20px;
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.2s;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.config-sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

.config-sidebar-item.active {
  color: var(--text-1);
  background: rgba(7, 94, 84, 0.15);
  border-left-color: var(--accent);
}

.config-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: var(--bg-root);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.users-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.updated {
  opacity: 0.4;
  transform: scale(0.98);
}

.json-cell {
  max-width: 300px;
}

.integrationName:disabled {
  background: #1a1a1a !important;
  cursor: not-allowed !important;
  color: #606060 !important;
}

.users-table {
  width: 100%;
  background: #1e1e1e;

  border-collapse: collapse;
  border: 1px solid #2a2a2a;
}

.users-table th,
.users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #2a2a2a;
  color: #a0a0a0;
}

.users-table th {
  color: #606060;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.users-table td {
  color: #f0f0f0;
}

/* ── Modais genéricos ── */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal-header {
  background: #075e54;
  color: white;
  padding: 20px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 20px;
  background: #1e1e1e;
}

/* ── Channel Options ── */
.channel-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.channel-option {
  cursor: pointer;
  text-align: center;
  padding: 15px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  transition: all 0.2s;
  background: #141414;
}

.channel-option:hover {
  border-color: #075e54;
  background: #0d1f1c;
  transform: translateY(-2px);
}

.channel-option.selected {
  border-color: #075e54;
  background: #0d1f1c;
  margin-bottom: 8px;
}

.channel-option-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.channel-option-title {
  font-size: 14px;
  font-weight: 500;
  color: #f0f0f0;
}

.channel-option-desc {
  font-size: 11px;
  color: #606060;
  margin-top: 4px;
  animation: fadeIn 0.3s ease;
}

.dynamic-fields {
  display: none;
}

.dynamic-fields.active {
  display: block;
}

/* ── Dashboard / Cards ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.chart-container {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.chart-wrapper {
  width: 100%;
  height: 250px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.stat-card {
  background: linear-gradient(135deg, #1a1f3a 0%, #2a1a3e 100%);
  border: 1px solid #2a2a3a;
  color: #f0f0f0;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  overflow: hidden;
  word-wrap: break-word;
}

.stat-card h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #a0a0b0;
}

.stat-card .value {
  font-size: 28px;
  font-weight: bold;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  margin-top: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: #141414;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-label {
  font-size: 9px;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4a5f80;
}

.filter-input {
  border-radius: 7px;
  outline: none;
  padding: 7px 12px;
  border: 1px solid #2a2a2a;
  background: #0d0d0d;
  color: #b5c6e6;
  color-scheme: dark;
  font-size: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.filter-input:focus {
  border-color: #075e54;
}

a {
  color: #f0f0f0;
}

a:hover {
  color: #788383;
}

.status-msg {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  color: #4a5f80;
  margin-left: auto;
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.card-item {
  display: block;
  background: linear-gradient(
    140deg,
    var(--s-fill-top, rgba(20, 184, 166, 0.28)) 0%,
    var(--s-fill-bot, rgba(20, 184, 166, 0.12)) 100%
  );
  border: 1px solid var(--s-border, rgba(20, 184, 166, 0.5));
  border-radius: 12px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: box-shadow 0.3s;
}

.item1 {
  --s-fill-top: rgba(59, 130, 246, 0.22);
  --s-fill-bot: rgba(59, 130, 246, 0.08);
  --s-border: rgba(59, 130, 246, 0.4);
  --s-glow: rgba(59, 130, 246, 0.15);
}

.inner {
  padding: 14px 20px;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}

.label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 3px;
  flex: 1;
}

.icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--mono);
  color: #fff;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

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

.sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ── Animações ── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes highlight {
  0% {
    background: rgba(29, 185, 147, 0.15);
    border-radius: 8px;
  }

  100% {
    background: transparent;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── Menu Hambúrguer + Responsividade ── */
.menu-hamburger {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 24px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
}

.dash-wrap * {
  box-sizing: border-box;
}

.dash-wrap {
  --dash-bg: #0f1117;
  --dash-card: #181c25;
  --dash-border: #252a38;
  --dash-text: #e8eaf0;
  --dash-muted: #8b92a8;
  --dash-muted2: #555d75;
  --dash-accent: #6c63ff;
  --dash-acc-sub: rgba(108, 99, 255, 0.12);
  --dash-danger: #ef4444;
  --dash-warn: #f59e0b;

  background: var(--dash-bg);
  color: var(--dash-text);
  padding: 24px 20px;
  width: 100%;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Header */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.dash-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-date {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--dash-muted);
  text-transform: capitalize;
}

.dash-live {
  font-size: 11px;
  color: var(--dash-muted);
  border: 1px solid var(--dash-border);
  padding: 5px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* SLA config */
.dash-sla-config {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--dash-muted);
}

.dash-sla-config input {
  width: 44px;
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--dash-text);
  font-size: 12px;
  text-align: center;
}

/* Alerta SLA */
.dash-sla-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}

.dash-sla-alert-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.dash-sla-alert-text {
  flex: 1;
}

.dash-sla-alert-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--dash-danger);
  flex-shrink: 0;
}

/* KPI */
.dash-kpi-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dash-stat-card {
  flex: 1;
  min-width: 120px;
  border: 1px solid var(--dash-border);
  border-top-width: 3px;
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--dash-card);
  position: relative;
}

.dash-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.dash-stat-label {
  font-size: 13px;
  color: var(--dash-muted);
  margin-top: 4px;
}

.dash-stat-sub {
  font-size: 11px;
  color: var(--dash-muted2);
  margin-top: 2px;
}

/* sub-linha de abertos anteriores dentro do card abertos */
.dash-stat-prev {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--dash-danger);
  background: rgba(239, 68, 68, 0.08);
  border-radius: 6px;
  padding: 2px 7px;
}

/* Card base */
.dash-card {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
  overflow: hidden;
}

.flow-item {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #2e2e3e;
  cursor: pointer;
}

.flow-item:hover {
  background: #23232f;
}

/* Section title */
.dash-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.dash-badge-accent {
  font-size: 11px;
  background: var(--dash-acc-sub);
  color: var(--dash-accent);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.dash-badge-danger {
  font-size: 11px;
  background: rgba(239, 68, 68, 0.12);
  color: var(--dash-danger);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* Canais + Donut */
.dash-grid-cd {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 14px;
  margin-bottom: 20px;
  align-items: start;
}

.dash-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.dash-channel-card {
  background: var(--dash-bg);
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 3px solid #aaa;
}

.dash-channel-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dash-channel-counts {
  display: flex;
  gap: 8px;
  font-size: 11px;
  flex-wrap: wrap;
}

.dash-channel-total {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}

/* Donut */
.dash-donut-card {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.dash-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.dash-donut-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.dash-donut-val {
  font-weight: 700;
}

/* Agentes */
.dash-agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.dash-agent-card {
  background: var(--dash-bg);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-agent-card--pending {
  border: 1px dashed rgba(245, 158, 11, 0.3);
}

.dash-agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dash-acc-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-accent);
  flex-shrink: 0;
}

.dash-agent-avatar--pending {
  background: rgba(245, 158, 11, 0.1);
  font-size: 16px;
}

.dash-agent-info {
  flex: 1;
  min-width: 0;
}

.dash-agent-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-agent-counts {
  display: flex;
  gap: 8px;
  font-size: 11px;
  margin-top: 3px;
}

.dash-agent-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--dash-accent);
  flex-shrink: 0;
}

/* Tickets */
.dash-tickets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.dash-tab-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.dash-tab-btn {
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--dash-border);
  font-size: 11px;
  cursor: pointer;
  background: transparent;
  color: var(--dash-muted);
  transition: all 0.15s;
}

.dash-tab-btn.active {
  background: var(--dash-accent);
  border-color: var(--dash-accent);
  color: #fff;
}

.dash-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 500px;
}

.dash-table thead tr {
  border-bottom: 1px solid var(--dash-border);
  color: var(--dash-muted);
}

.dash-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.dash-table tbody tr {
  border-bottom: 1px solid var(--dash-border);
}

.dash-table tbody tr.dash-row-alt {
  background: rgba(255, 255, 255, 0.015);
}

.dash-table tbody tr.dash-row-risco {
  background: rgba(239, 68, 68, 0.05);
}

.dash-table tbody tr.dash-row-anterior {
  background: rgba(239, 68, 68, 0.03);
}

.dash-table td {
  padding: 9px 10px;
  white-space: nowrap;
}

.dash-td-id {
  color: var(--dash-muted);
  font-family: monospace;
  font-size: 11px;
}

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

.dash-td-ch {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.dash-status-badge {
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.dash-sla-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--dash-danger);
  background: rgba(239, 68, 68, 0.12);
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

.dash-prev-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--dash-warn);
  background: rgba(245, 158, 11, 0.12);
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Top contatos */
.dash-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-top-pos {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.dash-top-bar-wrap {
  flex: 2;
  min-width: 60px;
  height: 6px;
  background: var(--dash-border);
  border-radius: 4px;
  overflow: hidden;
}

.dash-top-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.dash-top-val {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 20px;
  text-align: right;
}

/* Grupos */
.dash-card--group {
  border-top: 3px solid #334155;
}

.dash-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.dash-group-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dash-muted);
}

.dash-badge-group {
  font-size: 11px;
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.dash-group-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-group-stat {
  background: var(--dash-bg);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 110px;
  opacity: 0.78;
}

.dash-group-label {
  font-size: 12px;
  color: var(--dash-muted);
  margin-bottom: 4px;
}

.dash-group-value {
  font-size: 22px;
  font-weight: 700;
  color: #64748b;
}

.dash-group-sub {
  font-size: 11px;
  color: var(--dash-muted2);
}

/* ─── Topbar ─── */
.topbar {
  height: 52px;
  background: #18181f;
  border-bottom: 1px solid #2a2a35;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 100;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.logo {
  font-size: 15px;
  font-weight: 700;
  color: #ff6d5a;
  letter-spacing: -0.3px;
}

.flow-name {
  font-size: 13px;
  color: #66668a;
}

.spacer {
  flex: 1;
}

.btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.8;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #3a3a4d;
  color: #b0b0c8;
}

.btn-run {
  background: #ff6d5a;
  color: #fff;
}

/* ─── Layout ─── */
.workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
  height: calc(100dvh - 134px);
}

/* ─── Sidebar ─── */
.sidebar-flow {
  width: 200px;
  background: #18181f;
  border-right: 1px solid #2a2a35;
  padding: 16px 12px;
  overflow-y: auto;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #55557a;
  margin-bottom: 10px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: grab;
  margin-bottom: 4px;
  transition: background 0.12s;
  user-select: none;
}

.palette-item:hover {
  background: #23232f;
}

.palette-item:active {
  cursor: grabbing;
}

.p-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.p-label {
  font-size: 12px;
  color: #c0c0d8;
  font-weight: 500;
}

/* ─── Canvas ─── */
#drawflow {
  flex: 1;
  height: 100%;
  position: relative;
}

/* ─── Drawflow overrides ─── */
#drawflow {
  background: #101014 !important;
  background-image: radial-gradient(
    circle,
    #2a2a38 1px,
    transparent 1px
  ) !important;
  background-size: 22px 22px !important;
}

.drawflow .drawflow-node {
  background: #1e1e28 !important;
  border: 1px solid #2e2e3e !important;
  border-radius: 10px !important;
  padding: 0 !important;
  width: 210px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  transition:
    border-color 0.15s,
    box-shadow 0.15s !important;
  overflow: hidden;
}

.drawflow .drawflow-node.selected,
.drawflow .drawflow-node:hover {
  border-color: #ff6d5a !important;
  box-shadow:
    0 0 0 2px rgba(255, 109, 90, 0.2),
    0 4px 24px rgba(0, 0, 0, 0.5) !important;
}

.drawflow .drawflow-node .inputs,
.drawflow .drawflow-node .outputs {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.drawflow .drawflow-node .inputs {
  left: -6px;
}

.drawflow .drawflow-node .outputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  right: 6px;
}

.drawflow-delete {
  right: 0 !important;
  top: 0 !important;
  line-height: 20px !important;
  width: 25px !important;
  height: 25px !important;
  border: 1px solid #fff !important;
}

.drawflow .input,
.drawflow .output {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  border: 2px solid #101014 !important;
  background: #ff6d5a !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
}

.drawflow .connection .main-path {
  stroke: #ff6d5a !important;
  stroke-width: 2px !important;
  fill: none !important;
}

.drawflow .connection .main-path:hover {
  stroke: #ffaa9a !important;
  stroke-width: 3px !important;
}

/* ─── Node HTML interno ─── */
.n-node {
  display: flex;
  flex-direction: column;
}

.n-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid #2e2e3e;
}

.n-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.n-title {
  font-size: 12px;
  font-weight: 600;
  color: #e1e1e6;
}

.n-sub {
  font-size: 10px;
  color: rgba(160, 160, 190, 0.7);
  margin-top: 1px;
}

.n-body {
  padding: 8px 12px 10px;
}

.n-prop {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(150, 150, 180, 0.65);
  margin-bottom: 3px;
}

.n-prop span:last-child {
  color: #a0a0c0;
  font-weight: 500;
}

.n-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 5px;
}

.st-idle {
  background: rgba(130, 130, 160, 0.1);
  color: #8888a0;
}

.st-success {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.st-running {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
}

.st-error {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #23232f;
  border: 1px solid #2a2a35;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  color: #c0c0d8;
  z-index: 999;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.hide {
  opacity: 0;
}

/* ─── Toolbar do canvas ─── */
.canvas-toolbar {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 50;
}

.ct-btn {
  width: 34px;
  height: 34px;
  background: #18181f;
  border: 1px solid #2a2a35;
  border-radius: 7px;
  color: #8888a0;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}

.ct-btn:hover {
  background: #23232f;
  color: #e1e1e6;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: var(--surface2);
  color: var(--accent);
  border: 1px solid var(--border-bright);
}

.tab-badge {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--accent2);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
}

.tab-badge.blue {
  background: var(--accent);
  color: #000;
}

/* Section */
.section-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* Day cards grid */
.days-grid {
  display: grid;
  gap: 8px;
}

.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}

.day-card:hover {
  border-color: var(--border-bright);
}

.day-card.active-day {
  border-color: rgba(0, 212, 255, 0.3);
}

.day-card.inactive-day {
  opacity: 0.5;
}

.day-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.day-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  width: 70px;
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle input {
  display: none;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle input:checked + .toggle-track {
  background: var(--accent);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  pointer-events: none;
}

.toggle input:checked ~ .toggle-thumb {
  transform: translateX(16px);
}

/* Time inputs */
.time-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-sep {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
}

.time-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 7px 10px;
  width: 95px;
  text-align: center;
  transition: border-color 0.2s;
}

.time-input:focus {
  outline: none;
  border-color: var(--accent);
}

.time-input:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Timezone */
.tz-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tz-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.tz-row select {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}

.tz-row select:focus {
  outline: none;
}

/* Holidays */
.holiday-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.holiday-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.holiday-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent2);
  min-width: 100px;
}

.holiday-name {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.holiday-remove {
  background: var(--danger-dim);
  border: 1px solid rgba(255, 68, 102, 0.2);
  color: var(--danger);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s;
}

.holiday-remove:hover {
  background: var(--danger);
  color: #fff;
}

/* Add holiday form */
.add-holiday {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 10px;
  margin-top: 8px;
}

/* Inputs generic */
input[type="date"],
input[type="text"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 14px;
  width: 100%;
  transition: border-color 0.2s;
}

input[type="date"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.5);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  filter: brightness(1.15);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-success {
  background: var(--success);
  color: #000;
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* Action bar */
.action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Toast */
.toast-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface2);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
  min-width: 220px;
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--danger);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}

.stat-value {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--accent);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Loading spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Copy all row */
.copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-muted);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.copy-row select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
}

/* Queue selector */
.queue-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  align-items: center;
}

.select-wrap {
  flex: 1;
  position: relative;
}

.select-wrap select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 36px 10px 14px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.select-wrap select:focus {
  outline: none;
  border-color: var(--accent);
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 12px;
}

@media (max-width: 768px) {
  .config-container {
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  /* Sidebar vira menu horizontal no topo */

  .config-sidebar {
    width: 100%;
    min-width: unset;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px;
    gap: 4px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }

  .config-sidebar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .config-sidebar-item {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    border-radius: 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .config-sidebar-item.active {
    border-left: none;
    border-bottom-color: var(--accent);
    background: rgba(7, 94, 84, 0.2);
  }

  /* Conteúdo ocupa o restante da tela */

  .config-content {
    padding: 16px 12px;
    overflow-y: auto;
    flex: 1;
    height: calc(100% - 56px); /* Altura da sidebar horizontal */
  }
  .chat-footer {
    margin-top: auto;
    display: flex;
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    background: #141414;
    padding: 10px 16px;
    z-index: 100;
    gap: 10px;
    border-top: 1px solid #2a2a2a;
    flex-shrink: 0;
  }
  .dash-grid-cd {
    grid-template-columns: 1fr;
  }
  .config-sidebar {
    width: auto;
  }

  .channel-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .message-wrapper:last-child {
    margin-bottom: 5px;
  }

  .users-header h2 {
    display: none;
  }

  .message-input {
    display: block;
    flex: 1;
    min-width: 0;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 24px;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    font-family: inherit;
    max-height: 100px;
  }

  .message-input::placeholder {
    color: #606060 !important;
    font-size: 14px !important;
  }

  .send-btn,
  .attach-btn {
    display: flex !important;
    min-width: 40px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #075e54 !important;
    color: white !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .message-input:disabled {
    background: #1a1a1a !important;
    cursor: not-allowed !important;
    color: #606060 !important;
  }

  .activeHam {
    display: block;
  }

  .broadcast-btn {
    left: 70px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 300px;
    height: 100%;
    z-index: 1500;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.5);
    background: #141414;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .chat-container {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .top-menu {
    flex-direction: row;
    justify-content: space-between;
  }

  .menu-item {
    padding: 6px 12px;
    font-size: 13px;
  }
  .menu-hamburger.activeHam {
    background: var(--accent);
    color: #fff;
  }
  .chat-header {
    padding: 10px 16px;
    flex-shrink: 0;
  }

  .chat-header h2 {
    font-size: 16px;
  }

  .connection-status {
    font-size: 9px;
    padding: 2px 6px;
  }

  .message-bubble {
    max-width: 85%;
    font-size: 13px;
  }

  .messages-area {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }

  .message-footer {
    font-size: 9px;
  }

  .ticket-item {
    padding: 12px;
    margin: 0 4px 6px 4px;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      background-color 0.3s ease;
  }

  .ticket-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .ticket-name {
    font-size: 14px;
  }

  .ticket-preview {
    font-size: 12px;
  }

  .action-btn {
    padding: 4px 8px;
    font-size: 14px;
  }

  .qrcode-container {
    padding: 15px;
  }

  #qrcodeImage img,
  #qrcodeImage canvas {
    width: 200px !important;
    height: 200px !important;
    max-width: 100%;
    height: auto;
  }

  .channels-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pairing-code {
    font-size: 20px;
    word-break: break-all;
  }

  .file-preview {
    bottom: 70px;
    right: 10px;
    left: 10px;
    max-width: none;
    width: auto;
  }

  .file-preview-item {
    flex-wrap: wrap;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .tab-graficos {
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }
  .filter-switch {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-switch .switch-label {
    font-size: 13px;
  }

  .switch {
    width: 44px;
    height: 22px;
  }

  .slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
  }

  input:checked + .slider:before {
    transform: translateX(22px);
  }
}
.vscroll-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  width: 100%;
}

.vscroll-inner {
  position: relative;
  width: 100%;
}

.vscroll-window {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 4px;
  width: 100%;
}
