html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body { 
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header sempre visível no topo */
#header-placeholder {
  flex-shrink: 0;
  position: relative;
  z-index: 40;
}

/* Conteúdo principal ocupa espaço disponível */
#main-placeholder {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* Conteúdo dentro do main pode fazer scroll */
#mainContent {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* Footer sempre visível no final */
#footer-placeholder {
  flex-shrink: 0;
  position: relative;
  z-index: 40;
}

footer {
  flex-shrink: 0;
  width: 100%;
}

/* Modais aparecem sobre o conteúdo mas não cobrem header/footer */
[id$="Modal"],
#settingsPage {
  z-index: 50 !important;
}

/* Garantir que header e footer não sejam cobertos por modais */
header,
#header-placeholder > * {
  position: relative;
  z-index: 45;
}

footer,
#footer-placeholder > * {
  position: relative;
  z-index: 45;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}
.status-dot.connected { 
  background: #10b981; 
  color: #10b981;
  animation: pulse-green 2s infinite;
}
.status-dot.disconnected { 
  background: #6b7280; 
  color: #6b7280;
}
.status-dot.waiting { 
  background: #f59e0b; 
  color: #f59e0b;
  animation: pulse-orange 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes pulse-orange {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}
.gradient-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}
.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}
.instance-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
}
.instance-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}
.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.icon-glow {
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}

