* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1f2328;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.page-header h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.subtitle {
  margin: 0 0 24px;
  color: #57606a;
  font-size: 14px;
}

.card {
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.hint {
  color: #57606a;
  font-size: 13px;
  margin: 4px 0 0;
}

.hint-inline {
  color: #57606a;
  font-weight: normal;
  font-size: 12px;
}

.conn-box {
  text-align: center;
  padding: 8px 0;
}

.conn-box.hidden {
  display: none;
}

#qr-image {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  display: none;
}

#qr-image.visible {
  display: inline-block;
}

.status-ok {
  color: #1a7f37;
  font-weight: 600;
  font-size: 16px;
}

.status-paused {
  color: #9a6700;
  font-weight: 600;
  font-size: 16px;
}

.conn-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

input[type="text"],
textarea,
select {
  font-family: inherit;
  font-size: 14px;
  font-weight: normal;
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  resize: vertical;
}

.option-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.option-row input[type="text"] {
  flex: 1;
}

.option-row select {
  flex: 1;
}

.option-row .btn-remove-option {
  padding: 6px 10px;
  font-size: 12px;
}

.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #d0d7de;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: #1a7f37;
  border-color: #1a7f37;
  color: #fff;
  font-weight: 600;
}

.btn-danger {
  background: #d1242f;
  border-color: #d1242f;
  color: #fff;
  margin-top: 12px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  border: 1px solid #d0d7de;
  border-radius: 8px;
  padding: 12px;
}

.list-item-title {
  font-weight: 600;
  margin: 0 0 4px;
}

.list-item-meta {
  font-size: 12px;
  color: #57606a;
  margin: 0 0 6px;
}

.list-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eaeef2;
  color: #57606a;
  margin-left: 6px;
}

.badge.inactive {
  background: #ffebe9;
  color: #d1242f;
}

.option-preview {
  margin: 6px 0 0;
  padding-left: 20px;
  font-size: 13px;
  color: #333;
}

.empty-state {
  color: #57606a;
  font-size: 13px;
  font-style: italic;
}
