.loader {
  border: 3px solid #1e293b;
  border-top: 3px solid #06b6d4;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

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

#map {
  height: 400px;
  border-radius: 0.5rem;
}

.device-marker {
  background: #06b6d4;
  border: 3px solid white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.device-marker.offline {
  background: #ef4444;
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #334155;
  border: 1px solid #475569;
  border-radius: 0.5rem;
  color: white;
}

.input-field:focus {
  outline: none;
  ring: 2px;
  ring-color: #06b6d4;
  border-color: #06b6d4;
}

.btn-primary {
  padding: 0.5rem 1.5rem;
  background-color: #0891b2;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

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

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

.btn-danger {
  padding: 0.5rem 1rem;
  background-color: #dc2626;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.card {
  background-color: #1e293b;
  border-radius: 0.75rem;
  padding: 1rem;
}

.toggle-switch {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  background-color: #475569;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background-color: white;
  border-radius: 9999px;
  transition: transform 0.2s;
}

.toggle-switch.active {
  background-color: #0891b2;
}

.toggle-switch.active::after {
  transform: translateX(1.25rem);
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.online {
  background-color: #16a34a;
}

.status-badge.offline {
  background-color: #dc2626;
}

.status-badge.connected {
  background-color: #0891b2;
}

.status-badge.disconnected {
  background-color: #6b7280;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.8);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.8);
}

/* Animation utilities */
@keyframes pulse-shadow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
}

.animate-pulse-shadow {
  animation: pulse-shadow 2s infinite;
}

/* Glass effect */
.glass-effect {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Tab active indicator */
.tab-active {
  position: relative;
}

.tab-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  border-radius: 2px;
}
