:host {
  display: block;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.backend-tabs {
  display: flex;
  gap: 4px;
  background: #e5e7eb;
  padding: 4px;
  border-radius: 8px;
}

.backend-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}

.backend-tab.active {
  background: white;
  color: #111827;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.backend-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.active { background: #10b981; }
.status-dot.initializing { background: #f59e0b; }
.status-dot.ready { background: #3b82f6; }
.status-dot.error { background: #ef4444; }
.status-dot.unavailable { background: #d1d5db; }

.status-text {
  font-size: 13px;
  color: #6b7280;
}

.config-section {
  padding: 16px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

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

.config-row:last-child {
  margin-bottom: 0;
}

.config-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  min-width: 80px;
}

.model-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
}

.action-button {
  padding: 8px 16px;
  background: #8B7355;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.action-button:hover {
  background: #7a6349;
}

.action-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.progress-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: #8B7355;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.warning {
  padding: 10px 14px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 6px;
  font-size: 13px;
}

.error-box {
  padding: 10px 14px;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 6px;
  font-size: 13px;
}

.prompt-hint {
  padding: 10px 14px;
  background: #eff6ff;
  border-radius: 6px;
  font-size: 13px;
  color: #1e40af;
}
