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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  padding: 20px;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 24px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  border-radius: 8px 8px 0 0;
  margin-right: 4px;
}

.tab.active {
  background: #075e54;
  color: white;
  border-color: #075e54;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 24px;
  color: #075e54;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

h2 {
  font-size: 18px;
  color: #333;
}

#status-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge.connected {
  background: #d4edda;
  color: #155724;
}

.status-badge.disconnected {
  background: #f8d7da;
  color: #721c24;
}

.status-badge.checking {
  background: #fff3cd;
  color: #856404;
}

#qr-container {
  text-align: center;
  margin: 16px 0;
}

#qr-image {
  width: 256px;
  height: 256px;
  border: 2px solid #ddd;
  border-radius: 8px;
}

.hint {
  color: #666;
  font-size: 14px;
  margin: 8px 0;
}

#action-buttons {
  margin-top: 12px;
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn:hover {
  background: #f5f5f5;
}

.btn-primary {
  background: #075e54;
  color: white;
  border-color: #075e54;
}

.btn-primary:hover {
  background: #054d44;
}

.btn-danger {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.btn-danger:hover {
  background: #c82333;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 2px solid #eee;
  color: #666;
  font-size: 13px;
  text-transform: uppercase;
}

td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

td pre {
  white-space: pre-wrap;
  margin: 0;
  font-family: inherit;
  max-width: 400px;
}

.text-center {
  text-align: center;
  color: #999;
  padding: 32px !important;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
  margin-right: 4px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

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

.modal-header h3 {
  font-size: 18px;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.btn-close:hover {
  color: #333;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
