@media (max-width: 900px) {
  .admin-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0 !important;
    margin-bottom: 12px !important;
    width: 100% !important;
  }
  .admin-stats .stat-card {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 6px !important;
    font-size: 0.95em !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    word-break: break-word !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
  }
  .stat-info {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
  }
  .stat-number, .stat-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
  }
  .stat-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5em !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 900px) {
  .stat-cards-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    margin-bottom: 18px !important;
  }
  .stat-cards-row .stat-card {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 12px !important;
    font-size: 0.95em !important;
    max-width: 33vw !important;
  }
  .filters-left .search-input {
    width: 40% !important;
    min-width: 180px !important;
    max-width: 180px !important;
    font-size: 13px !important;
    padding: 6px 8px !important;
  }
}
/* Admin WhatsApp Styles - Tema Escuro */

.page-header {
  margin-bottom: 32px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  font-weight: 700;
  color: #e0e6f0;
  margin-bottom: 8px;
}

.page-title svg {
  color: #0ea5ff;
}

.page-subtitle {
  color: #8ca0b3;
  font-size: 16px;
  margin: 0;
}

/* Admin Header - Layout das estatísticas e controles */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
}

/* Stats Cards - Tema Escuro */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  flex: 1;
}

.stat-card {
  background: #181f2a;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(14, 165, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: rgba(14, 165, 255, 0.3);
  box-shadow: 0 6px 20px rgba(14, 165, 255, 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.stat-icon.online {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.stat-icon.offline {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-icon.total {
  background: linear-gradient(135deg, #0ea5ff, #0284c7);
}

.stat-info {
  flex: 1;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #e0e6f0;
  line-height: 1;
}

.stat-label {
  color: #8ca0b3;
  font-size: 14px;
  margin-top: 4px;
}

/* Controls - Tema Escuro */
.admin-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: rgba(14, 165, 255, 0.08);
  color: #0ea5ff;
  border-color: rgba(14, 165, 255, 0.2);
}

.btn-primary:hover {
  background: rgba(14, 165, 255, 0.18);
  border-color: #0ea5ff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
}

.btn-secondary {
  background: #20293a;
  color: #e0e6f0;
  border-color: rgba(14, 165, 255, 0.15);
}

.btn-secondary:hover {
  background: #2a3547;
  border-color: rgba(14, 165, 255, 0.3);
}

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

/* Loading State - Tema Escuro */
.loading-state {
  text-align: center;
  padding: 64px 20px;
  color: #8ca0b3;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(14, 165, 255, 0.1);
  border-top: 3px solid #0ea5ff;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Sessions Table - Tema Escuro */
.sessions-container {
  background: #181f2a;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(14, 165, 255, 0.15);
  overflow: hidden;
}

.sessions-table {
  width: 100%;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr 1.5fr;
  background: rgba(14, 165, 255, 0.08);
  border-bottom: 1px solid rgba(14, 165, 255, 0.18);
  padding: 0;
}

.table-header .table-cell {
  padding: 16px 20px;
  font-weight: 600;
  color: #66e8ff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-body {
  max-height: 600px;
  overflow-y: auto;
}

.session-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr 1.5fr;
  border-bottom: 1px solid rgba(14, 165, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  transition: background-color 0.2s;
}

.session-row:hover {
  background: rgba(14, 165, 255, 0.05);
}

.session-row:last-child {
  border-bottom: none;
}

.table-cell {
  
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #e0e6f0;
  padding: 0.5rem
}

/* User Info - Tema Escuro */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5ff, #0284c7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: #e0e6f0;
  margin-bottom: 2px;
}

.user-id {
  font-size: 12px;
  color: #8ca0b3;
  font-family: monospace;
}

/* Status Badge - Tema Escuro */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.connected {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Session Name - Tema Escuro */
.session-name {
  font-family: monospace;
  font-size: 13px;
  color: #60a5fa;
  background: #20293a;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(14, 165, 255, 0.2);
}

/* QR Status - Tema Escuro */
.qr-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.qr-status.available {
  color: #22c55e;
}

.qr-status.unavailable {
  color: #8ca0b3;
}

/* Actions */
.session-actions {
  display: flex;
  gap: 8px;
}

/* Empty State - Tema Escuro */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: #8ca0b3;
}

.empty-state svg {
  margin-bottom: 16px;
  color: rgba(14, 165, 255, 0.3);
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: #e0e6f0;
  margin-bottom: 8px;
}

.empty-state p {
  margin: 0;
  color: #8ca0b3;
}

/* Elementos adicionais para consistência com o tema */
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(14, 165, 255, 0.3);
}



/* Loading text */
.loading-state p {
  color: #8ca0b3;
  font-size: 16px;
  margin: 0;
}

/* Hover effects para cartões de estatísticas */
.stat-card {
  cursor: default;
}

/* Animação suave para spinner */
.spinner {
  filter: drop-shadow(0 0 6px rgba(14, 165, 255, 0.3));
}

/* Responsive - Tema Escuro */
@media (max-width: 1024px) {
  .table-header,
  .session-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .table-cell {
    border-bottom: 1px solid rgba(14, 165, 255, 0.1);
    justify-content: space-between;
  }
  /* Removido .table-cell:before para não exibir texto extra nas linhas da tabela */
  .table-header {
    display: none;
  }
  .sessions-table {
    width: 100%;
    overflow-x: auto;
    display: block;
  }
  .table-body {
    min-width: 600px;
    width: max-content;
    display: block;
    overflow-x: auto;
  }
  .session-row {
    min-width: 900px;
    width: max-content;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1.5fr;
  }
  .table-header {
    min-width: 1150px;
    width: max-content;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1.5fr;
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  .admin-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .admin-controls {
    flex-direction: row;
    width: 100%;
  }
  
  .admin-stats {
    grid-template-columns: 1fr;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-number {
    font-size: 20px;
  }
  
}
  
/* Modal de Detalhes da Sessão */
.custom-confirm-modal .custom-confirm-content {
  background: #181f2a;
  border: 2px solid rgba(14, 165, 255, 0.3);
}

.custom-confirm-modal .custom-confirm-message {
  color: #e0e6f0;
  max-height: 400px;
  overflow-y: auto;
}

.custom-confirm-modal .custom-confirm-message{
  width: 6px;
}

.custom-confirm-modal .custom-confirm-message{
  background: #20293a;
  border-radius: 3px;
}

.custom-confirm-modal .custom-confirm-message{
  background: rgba(14, 165, 255, 0.3);
  border-radius: 3px;
}

.custom-confirm-modal .custom-confirm-message {
  background: rgba(14, 165, 255, 0.5);
}

.custom-confirm-modal .btn-primary {
  background: rgba(14, 165, 255, 0.1);
  color: #0ea5ff;
  border: 2px solid #0ea5ff;
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.custom-confirm-modal .btn-primary:hover {
  background: #0ea5ff;
  color: #fff;
}

.btn-clear-filter {
  background: transparent;
  color: #60a5fa;
  border: 1.5px solid rgba(14,165,255,0.15);
  border-radius: 7px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.22s, color 0.22s, border 0.22s, box-shadow 0.22s, transform 0.12s;
  box-shadow: none;
}
.btn-clear-filter:hover, .btn-clear-filter:focus {
  background: rgba(14,165,255,0.12);
  color: #0ea5ff;
  border-color: #0ea5ff;
  box-shadow: 0 2px 8px rgba(14,165,255,0.10) inset;
  outline: none;
  transform: scale(1.08);
}
.btn-clear-filter:active {
  background: rgba(14,165,255,0.18);
  color: #fff;
  border-color: #0ea5ff;
  box-shadow: 0 0 0 2px rgba(14,165,255,0.18) inset;
  transform: scale(0.96);
}

.filters-left .search-input {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  background: linear-gradient(145deg, rgba(16, 24, 35, 0.95), rgba(12, 17, 25, 0.95));
  color: var(--muted-light);
  border: 1.5px solid rgba(14,165,255,0.15);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.04), 0 2px 8px rgba(14,165,255,0.06);
  transition: all 0.25s ease;
}
.filters-left .search-input:hover {
  border-color: rgba(14,165,255,0.35);
  box-shadow: 0 0 8px rgba(14,165,255,0.15);
  background: linear-gradient(145deg, rgba(16,26,38,1), rgba(12,20,30,1));
}

.filters-left .search-input:focus {
  outline: none;
  border-color: rgba(14,165,255,0.45);
  box-shadow: 0 0 0 3px rgba(14,165,255,0.12), inset 0 1px 2px rgba(255,255,255,0.05);
}